Is it possible to have an Axis to display only tick marks an no labels?
It looks like when I set labels visible to false the ticks go away.
I am using WPF TeeChart 4.1.2014.5092
Thanks in advance.
Axis ticks and labels
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Axis ticks and labels
Hello Dev01,
Yes, you can set label text to a blank space in the GetAxisLabel event, for example:
Yes, you can set label text to a blank space in the GetAxisLabel event, for example:
Code: Select all
void tChart1_GetAxisLabel(object sender, GetAxisLabelEventArgs e)
{
if (sender.Equals(tChart1.Axes.Left))
{
e.LabelText = " ";
}
}
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 |
Re: Axis ticks and labels
Thanks Narcis. I know this works, but isn't there a clean way of doing it - like enabling only ticks without enabling the labels. Because technically we are using up memory for those invisible "white space" labels and I am not sure how will it get disposed.
Thanks,
Dev01
Thanks,
Dev01
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Axis ticks and labels
Hello Dev01,
Ok, I added your request to bugzilla (ID1052). Feel free to sign up and add yourself to the CC List to receive updates on the issue.Dev01 wrote:but isn't there a clean way of doing it - like enabling only ticks without enabling the labels.
The next TeeChart update, which will be published very soon, will cache those texts so only one object will be created for such labels. This will mean very little memory impact. Also bear in mind that the .NET Framework is a garbage collected environment and this job is done automatically when disposing an object although objects are immediately freed, it's garbage collector who does that task. Therefore you may see memory consumption oscillations in your application. At this thread you'll find a more in deep discussion on garbage collector and TeeChart.Dev01 wrote:Because technically we are using up memory for those invisible "white space" labels and I am not sure how will it get disposed.
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 |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Axis ticks and labels
Hello Dev01,
Many apologies for having missed this property and the inconvenience it may have caused.
My colleague Christopher Ireland just reminded me that this is is already possible using the TickOnLabelsOnly property, e.g.:Narcís wrote:Ok, I added your request to bugzilla (ID1052). Feel free to sign up and add yourself to the CC List to receive updates on the issue.Dev01 wrote:but isn't there a clean way of doing it - like enabling only ticks without enabling the labels.
Code: Select all
Steema.TeeChart.Styles.Line series = new Steema.TeeChart.Styles.Line();
tChart1.Aspect.View3D = false;
tChart1.Series.Add(series);
series.FillSampleValues();
tChart1.Axes.Bottom.Labels.Visible = false;
tChart1.Axes.Bottom.Ticks.Visible = true;
tChart1.Axes.Bottom.TickOnLabelsOnly = false;
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 |