Esempio n. 1
0
        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);
            }
        }
Esempio n. 2
0
        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);
        }