Hello,
I have a Gantt chart connected to a database, sometimes i need to show 10 bars and sometimes i need to show 60 bars.
How can i resize the bars Height automaticaly?
do i need to do this by calculations? or there is a gantt chart option to do this?
Thanks.
Automatic Bars size
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Pujol1986,
I think that if the axes in your chart are set to automatic scaling this should be also automatic:
Does this help? How are the axes set up in your application?
Thanks in advance.
I think that if the axes in your chart are set to automatic scaling this should be also automatic:
Code: Select all
tChart1.Axes.Left.Automatic = true;
tChart1.Axes.Bottom.Automatic = true;
Thanks in advance.
Best Regards,
Narcís Calvet / 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 |
Hi Narcís,
This is now my Gantt:
And i need to see something like this:
i take the second picture after change the offset property of the axis
offset = -466
in the first picture the offset was set to 5
i have the default configuratión for the axis, i tried the automatic scaling but didn't work.
do i need to change by calculation the offset of the chart? or there is another way to configure the gantt like in the second picture?
thanks.
This is now my Gantt:
And i need to see something like this:
i take the second picture after change the offset property of the axis
offset = -466
in the first picture the offset was set to 5
i have the default configuratión for the axis, i tried the automatic scaling but didn't work.
do i need to change by calculation the offset of the chart? or there is another way to configure the gantt like in the second picture?
thanks.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Pujol1986,
In that case it may help you setting bottom axis mininum and maximum values manually using its SetMinMax method, when you have populated your series, for example:
In that case it may help you setting bottom axis mininum and maximum values manually using its SetMinMax method, when you have populated your series, for example:
Code: Select all
public Form1()
{
InitializeComponent();
InitializeChart();
}
private void InitializeChart()
{
tChart1.Aspect.View3D = false;
tChart1.Legend.Visible = false;
Steema.TeeChart.Styles.Gantt gantt1 = new Steema.TeeChart.Styles.Gantt(tChart1.Chart);
gantt1.FillSampleValues();
tChart1.Axes.Bottom.SetMinMax(gantt1.StartValues.Minimum - 10, gantt1.EndValues.Maximum + 10);
}
Best Regards,
Narcís Calvet / 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 |