MCPcopy Create free account
hub / github.com/Kitware/VTK / Update

Method Update

Charts/Core/vtkChartBox.cxx:92–127  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

90
91//------------------------------------------------------------------------------
92void vtkChartBox::Update()
93{
94 vtkTable* table = this->Storage->Plot->GetData()->GetInput();
95 if (!table)
96 {
97 return;
98 }
99
100 if (table->GetMTime() < this->BuildTime && this->MTime < this->BuildTime)
101 {
102 return;
103 }
104
105 vtkDataSetAttributes* rowData = table->GetRowData();
106 int nbCols = this->VisibleColumns->GetNumberOfTuples();
107
108 this->Storage->XPosition.resize(nbCols);
109
110 double grange[2] = { VTK_DOUBLE_MAX, VTK_DOUBLE_MIN };
111 // Now set up their ranges and locations
112 for (int i = 0; i < nbCols; ++i)
113 {
114 double range[2];
115 if (rowData->GetRange(this->VisibleColumns->GetValue(i).c_str(), range))
116 {
117 grange[0] = std::min(range[0], grange[0]);
118 grange[1] = std::max(range[1], grange[1]);
119 }
120 }
121
122 this->Storage->YAxis->SetMinimum(grange[0]);
123 this->Storage->YAxis->SetMaximum(grange[1]);
124
125 this->GeometryValid = false;
126 this->BuildTime.Modified();
127}
128
129//------------------------------------------------------------------------------
130bool vtkChartBox::Paint(vtkContext2D* painter)

Callers 4

PaintMethod · 0.95
SetColumnVisibilityMethod · 0.95
UpdateGeometryMethod · 0.45
SwapAxesMethod · 0.45

Calls 14

GetRowDataMethod · 0.80
minFunction · 0.50
maxFunction · 0.50
GetInputMethod · 0.45
GetDataMethod · 0.45
GetMTimeMethod · 0.45
GetNumberOfTuplesMethod · 0.45
resizeMethod · 0.45
GetRangeMethod · 0.45
c_strMethod · 0.45
GetValueMethod · 0.45
SetMinimumMethod · 0.45

Tested by

no test coverage detected