I trying to change chart line color at runtime. Here is the code I tried but does not work. Not sure where am I going wrong. Attached the template file.
I changed the code to use Border.Color and it worked properly. Note that, here I did not replace dll with the new version you specified. This is working with existing version also.
I changed the code to use Border.Color and it worked properly. Note that, here I did not replace dll with the new version you specified. This is working with existing version also.
Thanks,
Hetal
Hi,
Thanks for your feedback.
We are glad to know that existing version is also working fine with the given code. If you face any other issue, please feel free to post, we will be glad to assist you further.
There is one small problem with this implementation. The border.color works properly with most of colors but it does not work sometimes with some of the RGB colors like,
I think you may add / update your custom RGB color to the MS Excel color palette before specifying it as a border/line color in the chart’s series. For your information, for XLS (Excel 2003), there is a limitation and only 56 colors are there in the standard color palette, there is not such limitation for XLSX (Excel 2007/2010 formats) though. You may change the color palette for adding color by using Workbook.ChangePalette() method.
I do not think it is because of the color restriction because when I use the same custom RGB color for text color or cell background color it takes properly and shows up correct color.
Please try the new fix/version: Aspose.Cells for .NET (Latest Version). I have tested your case using it with your template file, it works fine. The line’s custom color is properly applied. Here is my updated code.
1) The attached file in your reply does not have correct color. Your output file has 0, 51, 102 instead of 0, 51, 153. I reported the same problem. I am not sure if you attached wrong output file.
2) The link of new fix version is in Java. My project is in .Net.
Pls check the output file first because I think the output itself is wrong.
1) Well, I tried to evaluate the output Excel file’s chart line color, I think it is fine, the first series color is OK, it is fine as R=0, G=51, B=153, I could not notice the issue. Could you check and compare the first’ series color values in some photo editor package e.g Adobe Photo shop and give us screen shots for the issue. We will check it soon.