Hi
I have a piechart linked to a dataset. (Dynamic) I need to change the colors of the PieChart at runtime within the Report itself based on a specific set of colors for the report (which is dependent on the specifc organization - each organization wants to define their specific colors). None of the standard colors is acceptable to my client.
For instance the colors colors are blue/orange (Only two values) but I need to make each slice (Value) of the Pie Chart a very specific color - it might or might not have to relate to the specific value in that slice.
TeeChart - Dynamic (Custom) Colors for PieChart
Re: TeeChart - Dynamic (Custom) Colors for PieChart
Hello,
You can set the colour as you add the data, using an rgb colour that matches the colour you require.
eg.
or change the colour after adding the data.
Series1.ValueColor[1] := rgb(108,107,245);
alternatively, if you're working with a datasource, you can set the colour source for the Series from a field containg the colour definition.
ie.
Marc Meumann
You can set the colour as you add the data, using an rgb colour that matches the colour you require.
eg.
Code: Select all
Series1.AddXY(50,50,'',rgb(128,107,45));
Series1.ValueColor[1] := rgb(108,107,245);
alternatively, if you're working with a datasource, you can set the colour source for the Series from a field containg the colour definition.
ie.
Regards,Series1.ColorSource := dbColorField;
Marc Meumann
Steema Support