< VTK | ChartsJump to navigationJump to search
Revision as of 13:40, 19 October 2009 by Marcus.hanwell (Some initial thoughts about API.)
There has been a lot of talk about API. Do we want a declarative UI? This would make constructs such as,
vtkChart *chart = vtkChart::New(); chart->SetWidth(200) ->SetHeight(200); chart->AddPlot(vtkChart::BAR) ->SetData(table, 1, 2) ->SetWidth(20) ->SetLabel("My Data");
This would require setter functions that returned a pointer to the object, i.e.
vtkChart * vtkChart::SetWidth(int width); vtkPlot * vtkChart::AddPlot(enum); vtkPlot * vtkPlot::SetLabel(const char *label);