Page 1 of 1

Stack Bar Chart

Posted: Fri Oct 26, 2018 1:18 pm
by 16683749
Hi,
We are using Teechart.net 2012 in which we are plotting saturation data on stacked bar chart. We have the series values as follows:

Code: Select all

Distance          sat1          sat2          sat3
8335             0.116          0.154        0.73
8360             0.121          0.553        0.325
8400             0.121          0.856        0.023
The issue is that the thickness of the bars is automatically determined. For the distance value 8335, the bar goes from 8325 to 8350. We have another data series showing the extent to which the data is applicable. Its values are as follows:

Code: Select all

Distance          extent
8335                 20
8360                 30
8400                 50
We want to change the thickness of the bars according to this data. The bar for distance value 8335 should be 20 units thick and range from 8325 to 8345. Is there any way to do this? Perhaps some other series or some option where we can change the width.
We are attaching the snap shot of the current view of stacked bar chart.

Regards,
Amol

Re: Stack Bar Chart

Posted: Fri Nov 02, 2018 12:25 pm
by Christopher
Bhanu wrote:
Fri Oct 26, 2018 1:18 pm
We want to change the thickness of the bars according to this data. The bar for distance value 8335 should be 20 units thick and range from 8325 to 8345. Is there any way to do this? Perhaps some other series or some option where we can change the width.
We are attaching the snap shot of the current view of stacked bar chart.
The closest we have to this is the ErrorBar series, but this is not horizontal. My best suggestion to achieve this would be to create your own custom class which derives from TChart's CustomBar class (the Bar class derives from the CustomBar class too). If you open the TeeChart.dll using the .net reflector (or equivalent, I use ILSpy) you will be able to see which classes you need to override. Please bear in mind that Steema offers consulting services whereby we can be contracted to do the work for you.