protected override void Initialize() { base.Initialize(); IVtkChartModel doc = this.Model as IVtkChartModel; vtkChart chart = this._chartItem as vtkChart; if (doc != null && chart != null) { chart.SetShowLegend(doc.IsLegendVisible); } }
public virtual int AddPlot(VtkPlotModel plotModel) { vtkChart chart = this._chartItem as vtkChart; vtkPlot plot = plotModel.PlotItem as vtkPlot; if (chart == null || plot == null) { return(-1); } int index = chart.AddPlot(plot); if (index == -1) { this.Log.Error("Could not add plot"); } return(index); }