Hi together,
what always bothers me is, that the chart's grid an axes are turned of, when no series is active. Is there a way to overcome this? I have applications that dynamically create and destroy series. The min/max etc. of the axes are configured (automatic = off). Why does TChart turn off all axes and grids? How can I force TChart to draw them even if no series is active?
Thanks
Alex
Show grid when no series is active
Re: Show grid when no series is active
Hello Alex,
TeeChart doesn't draw an axis when no series uses it and
Also, you may want to set some min and max. Ie:
TeeChart doesn't draw an axis when no series uses it and
LabelStyle
is set to its default value: talAuto
.Also, you may want to set some min and max. Ie:
Code: Select all
Chart1.Axes.Bottom.SetMinMax(0,10);
Chart1.Axes.Bottom.LabelStyle:=talValue;
Chart1.Axes.Left.SetMinMax(0,10);
Chart1.Axes.Left.LabelStyle:=talValue;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Show grid when no series is active
Hi Yeray,
thank you very much. This works . Only one thing: How can I force the bottom axis to display datetime values if no series is active? The bottom axis shows the number instead of the value and I'm not able to set the datetime format (hh:nn:ss) but the numeric format..
I could live with that - it's much better than before. But if there is a solution to force the display of the datetime format it would be perfect .
Alex
thank you very much. This works . Only one thing: How can I force the bottom axis to display datetime values if no series is active? The bottom axis shows the number instead of the value and I'm not able to set the datetime format (hh:nn:ss) but the numeric format..
I could live with that - it's much better than before. But if there is a solution to force the display of the datetime format it would be perfect .
Alex
Re: Show grid when no series is active
Alex,
The only way to achieve this is by adding a dummy series (with no data) as follows:
The only way to achieve this is by adding a dummy series (with no data) as follows:
Code: Select all
Chart1.AddSeries(TPointSeries).XValues.DateTime:=True;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |