We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Waterfall Chart: Failed to Set Colors for Up/Down Bars with Supporting Legend

Hello,

I tried to set up colors for up/down bars with supporting legend.
If I selected color for each item(column) - I haven’t matching colors in legend.
I tried use ChartData.Series[0].ParentSeriesGroup.UpDownBars for set up colors - but it isn’t work.

Example:

chart.ChartData.Series[0].ParentSeriesGroup.UpDownBars.HasUpDownBars = true;
chart.ChartData.Series[0].ParentSeriesGroup.IsColorVaried = true;
chart.ChartData.Series[0].ParentSeriesGroup.UpDownBars.DownBarsFormat.Fill.FillType = FillType.Solid;
chart.ChartData.Series[0].ParentSeriesGroup.UpDownBars.UpBarsFormat.Fill.FillType = FillType.Solid;
chart.ChartData.Series[0].ParentSeriesGroup.UpDownBars.DownBarsFormat.Fill.SolidFillColor.Color = Color.Brown;
chart.ChartData.Series[0].ParentSeriesGroup.UpDownBars.UpBarsFormat.Fill.SolidFillColor.Color = Color.Lime;

@ikyrieieva,
Thank you for contacting support.

It will take me a while to investigate this case. We will reply to you as soon as possible.

1 Like

@ikyrieieva,
Could you please share your presentation output file with the chart and presentation with the chart having the desired appearance that customized in PowerPoint? You can zip the files and upload the archive here.

@Andrey_Potapov,
The main goal of this that have the ability to set up colors for increase/decrease/total columns with supporting legend.
I can set up color for series, but then I colored all points in one color, but waterfall chart - that three colors.
I found property pptChart.ChartData.Series[0].ParentSeriesGroup.UpDownBars. And I thought may be that can help me for configure up and down bars. But that isn’t affected to the chart.

Code example:

var pres = new Presentation();
var pptChart = pres.Slides[0].Slide.Shapes.AddChart(ChartType.Waterfall, 0, 0, 700, 300);

var pptSeries = pptChart.ChartData.Series[0];
pptSeries.Format.Fill.FillType = FillType.Solid;
pptSeries.Format.Fill.SolidFillColor.Color = Color.Blue;

var parentGroupSeries = pptSeries.ParentSeriesGroup;
parentGroupSeries.UpDownBars.HasUpDownBars = true;
parentGroupSeries.IsColorVaried = true;
parentGroupSeries.UpDownBars.DownBarsFormat.Fill.FillType = FillType.Solid;
parentGroupSeries.UpDownBars.DownBarsFormat.Fill.SolidFillColor.Color = Color.Brown;
parentGroupSeries.UpDownBars.UpBarsFormat.Fill.FillType = FillType.Solid;
parentGroupSeries.UpDownBars.UpBarsFormat.Fill.SolidFillColor.Color = Color.Lime;

Result - “Example1.pptx”

If I colored series in color, and then recolored for example decrease and increase points - I see that in legend all colors are the same.

Code example:

var pptSeries = pptChart.ChartData.Series[0];
pptSeries.Format.Fill.FillType = FillType.Solid;
pptSeries.Format.Fill.SolidFillColor.Color = Color.Blue;

pptSeries.DataPoints[1].Format.Fill.FillType = FillType.Solid;
pptSeries.DataPoints[1].Format.Fill.SolidFillColor.Color = Color.Lime;
pptSeries.DataPoints[2].Format.Fill.FillType = FillType.Solid;
pptSeries.DataPoints[2].Format.Fill.SolidFillColor.Color = Color.Lime;
pptSeries.DataPoints[3].Format.Fill.FillType = FillType.Solid;
pptSeries.DataPoints[3].Format.Fill.SolidFillColor.Color = Color.Brown;
pptSeries.DataPoints[5].Format.Fill.FillType = FillType.Solid;
pptSeries.DataPoints[5].Format.Fill.SolidFillColor.Color = Color.Brown;
pptSeries.DataPoints[6].Format.Fill.FillType = FillType.Solid;
pptSeries.DataPoints[6].Format.Fill.SolidFillColor.Color = Color.Lime;

Result - “Example2.pptx”

So I need solution for colored waterfall chart with supporting legend.
My goal - “Example3.pptx”
Pay attention to legends part, please!

Examples.7z (107.0 KB)

Thanks!

@ikyrieieva,
Thank you for the additional information. I will check your results and reply to you later.

@ikyrieieva,
I’ve reproduced the problem with setting colors for waterfall chart bars and added a ticket with ID SLIDESNET-43136 to our issue tracking system. We apologize for any inconvenience. Our development team will investigate these cases. You will be notified when the issue is resolved.