Hi,
Is it possible to have different color bars in a bar chart for DbAdvChart? How do I do that.
Much appreciated.
Regards
Marius
Hello,
I have the same worries, did you find the solution?
After loading all data in the DBChart, you need to loop the points and set the Color value of that point.
I have a ctHistogram and I want the bars to be different colors according to my values, I must still use the property "Points"?
If it does nothing then can you at least provide a sample that demonstrates your issue?
I have a graph (TDBAdvGDIPChartView) with 1 series (with chartType: = ctHistogram).
I would like on this series, bars of histograms have different color for each value. For example, the histogram of this site: http://www.bibmath.net/dico/index.php?action=affiche&quoi=./h/histogramme.html
I'm so sorry but it dosen't work.I have no message error and the bars stay white... I give a part of my code :
DBAdvGDIPChartView1.BeginUpdate;
with DBAdvGDIPChartView1.Panes[0] do
// Propriété de Panneau d'un graphique
begin
Series.Clear;
DataSource := ds;
XAxis.Size:= 300;
XAxis.Text:='';
YAxis.Text:= Edit1.Text;
YAxis.AutoUnits:= FALSE;
// Création de la série
begin
chartType:= ctHistogram;
FieldNameValue:= valueY;
FieldNameXAxis:= valueX;
LegendText:= 'OMR_KGH';
LineColor:= clRed;
for Z := 0 to length(Points)-1 do
begin
Points[Z].Color:= clGreen;
end;
Your dataset connection is turned off, so there will be no points inside the series.
I'm sorry, it works.