Pie chart - custom colors
Pie chart - custom colors
I am playing with selecting a custom color for my pie slices. When I try to select black the result is really amazing! In some cases it selects random color, while sometimes it does keep my black, but then in the legend the "black" slice looses its symbol. Well, I did get curious and spend some time to figure out what in fact it was doing. What I found is that when I select black color, for pie chart it means "select an appropriate color for the selected slice from current color palette" - so here is the random color selection (not a single user will connect selection of black color with some type of default selection and most of them will not even know about the color palette). It gets better if my color palette includes black. In this case if I tell pie chart to do its magic selecting a color and it happens to be black - then no symbol is shown in the legend. I am not sure why you did go through this type of pain for a simple thing like just selecting a color, but please, if I as a user have selected a color (any color) do not play God and select something else for me, just keep my selection!
Re: Pie chart - custom colors
Hello UserLS,
I couldn't reproduce your problem here. Can you please, explain exactly steps you followed? So we can reproduce exactly your problem here.
Thanks,
I couldn't reproduce your problem here. Can you please, explain exactly steps you followed? So we can reproduce exactly your problem here.
Thanks,
Best Regards,
Sandra Pazos / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: Pie chart - custom colors
Well, the change was made to Series.ValueColor method (I am not sure if it affects all series types or circular only). If I set:
Series.ValueColor returns some other (default) color, not the one I've selected, which was not the case before. This value is not displayed on the legend, if Color.FromRGB(0, 0, 0) is included into my color palette either (and If I use Color.Black instead it will work just fine). My problem is: I have no control over what clients are setting on their graphs and Color.FromRGB() is used a lot in our code too. It is weird though, that my selection is not kept anymore and replaced with some other value.
Code: Select all
Series[n].Color = Color.FromRGB(0, 0, 0)
Re: Pie chart - custom colors
Hello UserLs,
Thanks for your information. I have added your request in bug list report with number[TF02015443]. We will try to fix it to future maintenance releases of TeeChart.Net.
On the other hand, Could you tell us which is the version that next code works correctly for you?
Thanks,
Thanks for your information. I have added your request in bug list report with number[TF02015443]. We will try to fix it to future maintenance releases of TeeChart.Net.
On the other hand, Could you tell us which is the version that next code works correctly for you?
Code: Select all
Steema.TeeChart.Styles.Pie series1 = new Steema.TeeChart.Styles.Pie(tChart1.Chart);
series1.FillSampleValues(4);
for (int i = 0; i < series1.Count; i++)
{
series1[i].Color = Color.FromArgb(0, 0, 0, 0);
}
Best Regards,
Sandra Pazos / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: Pie chart - custom colors
The version we upgraded from was the July (or may be April) build in 2010 and it was working correctly then.
Re: Pie chart - custom colors
Hello UserLs,
Thanks for your information, we have checked that in version 4.0.2010.27961 the property FromArgb works as expect.
Thanks,
Thanks for your information, we have checked that in version 4.0.2010.27961 the property FromArgb works as expect.
Thanks,
Best Regards,
Sandra Pazos / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |