Ejemplo n.º 1
0
        public void FillChart(IChart chart, IChartAxis[] axis)
        {
            if (!(chart is XSSFChart))
            {
                throw new ArgumentException("Chart must be instance of XSSFChart");
            }

            XSSFChart       xssfChart      = (XSSFChart)chart;
            CT_PlotArea     plotArea       = xssfChart.GetCTChart().plotArea;
            int             allSeriesCount = plotArea.GetAllSeriesCount();
            CT_ScatterChart scatterChart   = plotArea.AddNewScatterChart();

            AddStyle(scatterChart);

            for (int i = 0; i < series.Count; ++i)
            {
                Series s = (Series)series[i];
                s.SetId(allSeriesCount + i);
                s.SetOrder(allSeriesCount + i);
                s.AddToChart(scatterChart);
            }

            foreach (IChartAxis ax in axis)
            {
                scatterChart.AddNewAxId().val = (uint)ax.Id;
            }
        }
Ejemplo n.º 2
0
        public void FillChart(IChart chart, IChartAxis[] axis)
        {
            if (!(chart is XSSFChart))
            {
                throw new ArgumentException("Chart must be instance of XSSFChart");
            }
            CT_ScatterChart ctScatterChart = ((XSSFChart)chart).GetCTChart().plotArea.AddNewScatterChart();

            this.AddStyle(ctScatterChart);
            foreach (XSSFScatterChartData <Tx, Ty> .Serie serie in this.series)
            {
                serie.AddToChart(ctScatterChart);
            }
            foreach (IChartAxis axi in axis)
            {
                ctScatterChart.AddNewAxId().val = (uint)axi.GetId();
            }
        }
Ejemplo n.º 3
0
        public void FillChart(IChart chart, IChartAxis[] axis)
        {
            if (!(chart is XSSFChart))
            {
                throw new ArgumentException("Chart must be instance of XSSFChart");
            }

            XSSFChart       xssfChart    = (XSSFChart)chart;
            CT_PlotArea     plotArea     = xssfChart.GetCTChart().plotArea;
            CT_ScatterChart scatterChart = plotArea.AddNewScatterChart();

            AddStyle(scatterChart);

            foreach (Series s in series)
            {
                s.AddToChart(scatterChart);
            }

            foreach (IChartAxis ax in axis)
            {
                scatterChart.AddNewAxId().val = (uint)ax.Id;
            }
        }