****CHART lines not picking up color settings****


#1

Thanks Laurence for your quick and hasty response on my first post, entitled: ****CHART Plot Area set Foregroundcolor moves legend . I downloaded the fix(AsposeExcel.dll version 3.5.2.7) from your reply and it solved the legend moving problem!!! I just have one more request for you. On my chart I have total of 9 series, 3 of which are in dashed format the other six are just regular lines. Here is how I format the dashed lines:

chart.NSeries[0].Name = "Level 1 Goal";

chart.NSeries[0].MarkerStyle = ChartMarkerType.None;

chart.NSeries[0].Line.Weight = WeightType.SingleLine;

chart.NSeries[0].Line.Style = LineType.Dash;

chart.NSeries[0].Line.Color = Color.Brown;

chart.NSeries[1].Name = "Level 3 Goal";

chart.NSeries[1].MarkerStyle = ChartMarkerType.None;

chart.NSeries[1].Line.Weight = WeightType.SingleLine;

chart.NSeries[1].Line.Style = LineType.Dash;

chart.NSeries[1].Line.Color = Color.Pink;

chart.NSeries[2].Name = "Level 5 Goal";

chart.NSeries[2].MarkerStyle = ChartMarkerType.None;

chart.NSeries[2].Line.Weight = WeightType.SingleLine;

chart.NSeries[2].Line.Style = LineType.Dash;

chart.NSeries[2].Line.Color = Color.Yellow;

It looks like it doesn't pick up the colors that I set on the dashed lines. It picks up the yellow... on the chart.NSeries[2] series but the first two don't pick up(This is wierd as well....I have another series in the other six with yellow...it seems any color that I put in that is on the other 6 lines that aren't dashed it picks them up). The colors were working before when they were solid, not dashed so I went back and tried to reverse the linestyle to solid but that didn't change anything. I don't know if it is the new aspose.excel.dll with the fix in it or what. If you could kindly check on this for me that would be great!!!.......I will be finished!!!!


#2

Please don't hesitate to contact us if you meet any problem. We will do our best to support our users.

For this issue, please try use the following code:

excel.ChangePalette(Color.Brown, 55);

chart.NSeries[0].Line.Color = Color.Brown;

excel.ChangePalette(Color.Pink, 55);

chart.NSeries[1].Line.Color = Color.Pink;

Pink and Brown color is not in the Excel standard palette. Please check http://www.aspose.com/Wiki/default.aspx/Aspose.Excel/ColorAndPalette.html for more information.