I have 2 Series from Datasets and for the sake of discussion lets say each series has a Fruit type and a Value.
Series1
Apples 2
Bananas 3
Cherries 4
Oranges 1
Series2
Bananas 6
Oranges 12
First Problem. I would like to see the bar charts such that each fruit and value appear next to each other. Ie. the Bananas are together and the Oranges are together. Where there is no corresponding fruit in Series2 there should be a 0 value bar. When I set up the datasets, instead what I get is the Apples from Series1 next to Bananas in Series2 and Bananas in Series1 next to Oranges in Series2. I can't figure out how to let TChart know that my X-Values are common and need to be grouped together.
Second Problem. I can get around this one, but if there is a built in or preferred method I'd like to know. Basically I'm not really interested in the actual value I'm interested in the weightings of my series. So from my example Series 1 is 20% Apples, 30% Bananas, 40% Cherries and 10% Oranges. Series 2 is 33% Bananas and 67% Oranges. I could change my query to pass in Percents rather than the values. But it would be nice if I could have the Y-Axis plot percentage rather than value.
Hopefully this made sense.
Other info: TChart Pro v.6 Delphi 7
Simple Bar Chart - 2 Series Side by Side
Hi Rory,
TChartAxis.AxisValuesFormat string. This can be any valid format string. For
example, a percent format :
How about using :First Problem. I would like to see the bar charts such that each fruit and value appear next to each other. Ie. the Bananas are together and the Oranges are together. Where there is no corresponding fruit in Series2 there should be a 0 value bar. When I set up the datasets, instead what I get is the Apples from Series1 next to Bananas in Series2 and Bananas in Series1 next to Oranges in Series2. I can't figure out how to let TChart know that my X-Values are common and need to be grouped together.
Code: Select all
Series1.MultiBar := mbSideAll;
Generally the axis labels (numeric) are formatted according toSecond Problem. I can get around this one, but if there is a built in or preferred method I'd like to know. Basically I'm not really interested in the actual value I'm interested in the weightings of my series. So from my example Series 1 is 20% Apples, 30% Bananas, 40% Cherries and 10% Oranges. Series 2 is 33% Bananas and 67% Oranges. I could change my query to pass in Percents rather than the values. But it would be nice if I could have the Y-Axis plot percentage rather than value.
TChartAxis.AxisValuesFormat string. This can be any valid format string. For
example, a percent format :
Code: Select all
Chart1.Axes.Left.AxisValuesFormat := '0.00 %';
Pep Jorge
http://support.steema.com
http://support.steema.com