ASP.NET MS Charting中的堆栈和未堆栈列

时间:2013-06-27 19:16:29

标签: c# asp.net charts mschart

我有4个数据显示:基本销售,加售,取消,无销售

我想要Base Sales&堆叠列中的加售和取消和&在他们自己的未堆叠列中没有销售。

这就是我创建系列的方式:

    //--- set base package series
    Series BasePackageSeries = new Series("BasePackageSeries");
    BasePackageSeries.ChartType = SeriesChartType.StackedColumn;
    BasePackageSeries.Color = ColorTranslator.FromHtml("#146c00"); //--- dark green

    //--- set upsell package series
    Series UpsellPackageSeries = new Series("UpsellPackageSeries");
    UpsellPackageSeries.ChartType = SeriesChartType.StackedColumn;
    UpsellPackageSeries.Color = ColorTranslator.FromHtml("#1fa700"); //--- lighter green

    //--- set civ series
    Series CIVSeries = new Series("CIV");
    CIVSeries.ChartType = SeriesChartType.Column;
    CIVSeries.Color = Color.Gold;

    //--- set no sales series
    Series NSSeries = new Series("No Sales");
    NSSeries.ChartType = SeriesChartType.Column;
    NSSeries.Color = Color.Red;

当它们被添加时,前三个显示堆叠而No Sales本身(可能因为它太大了)。我希望前两个堆叠,最后两个堆叠。关于如何实现我想要的任何建议?

我通过循环手动生成数据点。如果你需要看到,请告诉我。

0 个答案:

没有答案