Scale And Marks
-
- Newbie
- Posts: 58
- Joined: Thu Jul 05, 2012 12:00 am
Scale And Marks
On the sample graph I have set the scale to 0 to 100, by
WebChart1.Chart.Axes.Left.SetMinMax(0,100);
I want it be in qty's of 10 and not 5, ie 10,20,30 etc
Also
I wish to show the marks as values an not as per the bottom axis label, data is being added like:-
footer = mnth + "_" + year + "\n(n=" + totaln + ")";
line1.Add(7, footer);
WebChart1.Chart.Axes.Left.SetMinMax(0,100);
I want it be in qty's of 10 and not 5, ie 10,20,30 etc
Also
I wish to show the marks as values an not as per the bottom axis label, data is being added like:-
footer = mnth + "_" + year + "\n(n=" + totaln + ")";
line1.Add(7, footer);
- Attachments
-
- Graph.JPG (54.56 KiB) Viewed 10570 times
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Scale And Marks
Hi mikethelad,
For further information about axis settings please read tutorial 4. Tutorials can be found at TeeChart's program group.
You should set Increment property then:I want it be in qty's of 10 and not 5, ie 10,20,30 etc
Code: Select all
tChart1.Axes.Bottom.Increment = 10;
You can set Label.Style like this:I wish to show the marks as values an not as per the bottom axis label, data is being added like:-
Code: Select all
tChart1.Axes.Bottom.Labels.Style = Steema.TeeChart.AxisLabelStyle.Value;
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 |
-
- Newbie
- Posts: 58
- Joined: Thu Jul 05, 2012 12:00 am
Re: Scale And Marks
Hi, scale change works fine. The axis label, is correct how I have it, I want the mark on the line to show the value
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Scale And Marks
Hi mikethelad,
Sorry, I understood you wanted the values as bottom axis labels. In that case what you need to change is Marks.Style:I want the mark on the line to show the value
Code: Select all
tChart1[0].Marks.Style = Steema.TeeChart.Styles.MarksStyles.Value;
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 |
-
- Newbie
- Posts: 58
- Joined: Thu Jul 05, 2012 12:00 am
Re: Scale And Marks
Thanks, that works, see new graph, is there anyway to overcome the following:-
1. Overlap of the marks?
2. How to show the % symbol after the mark value
3. 1st and last one not showing
1. Overlap of the marks?
2. How to show the % symbol after the mark value
3. 1st and last one not showing
- Attachments
-
- graph.JPG (39.12 KiB) Viewed 10540 times
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Scale And Marks
Hi mikethelad,
Yes, you can do something similar as in the example Pep posted here.1. Overlap of the marks?
Either using one of the percent related MarksStyles values or manually adding it to the mark text with the GetSeriesMark event:2. How to show the % symbol after the mark value
Code: Select all
void Form1_GetSeriesMark(Steema.TeeChart.Styles.Series series, Steema.TeeChart.Styles.GetSeriesMarkEventArgs e)
{
e.MarkText += "%";
}
Using MinimumOffset and MaximumOffset, for example:3. 1st and last one not showing
Code: Select all
tChart1.Axes.Bottom.MinimumOffset = 5;
tChart1.Axes.Bottom.MaximumOffset = 5;
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 |
-
- Newbie
- Posts: 58
- Joined: Thu Jul 05, 2012 12:00 am
Re: Scale And Marks
What calls the GetSeriesMark event, have tried in the afterdraw but no lucj
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Scale And Marks
Hi mikethelad,
Series call it. You have to subscribe the series to this event.
Series call it. You have to subscribe the series to this event.
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 |
-
- Newbie
- Posts: 58
- Joined: Thu Jul 05, 2012 12:00 am
Re: Scale And Marks
Sorry don't understand how to :-
"Series call it. You have to subscribe the series to this event."
"Series call it. You have to subscribe the series to this event."
Re: Scale And Marks
Hello mikethelad,
You must subscribe and call the GetSeriesMark event when you initialize chart. You can do something next:
As you see, in previous code, I have subscribed and called the event for each series in the initialization of chart and it works fine for me. I recommend you always call the event in the initialization of Chart to avoid problems.
Thanks,
You must subscribe and call the GetSeriesMark event when you initialize chart. You can do something next:
Code: Select all
...
tChart1.Axes.Bottom.Labels.Style = Steema.TeeChart.AxisLabelStyle.Value;
line1.GetSeriesMark += new Series.GetSeriesMarkEventHandler(series_GetSeriesMark);
line2.GetSeriesMark +=new Series.GetSeriesMarkEventHandler(series_GetSeriesMark);
line3.GetSeriesMark +=new Series.GetSeriesMarkEventHandler(series_GetSeriesMark);
}
void series_GetSeriesMark(Series series, GetSeriesMarkEventArgs e)
{
if (tChart1.Series.IndexOf(series) == 0)
{
e.MarkText = series.XValues[e.ValueIndex].ToString() + " %";
}
else if (tChart1.Series.IndexOf(series)==1)
{
e.MarkText = series.XValues[e.ValueIndex].ToString() + " %";
}
else if (tChart1.Series.IndexOf(series) == 2)
{
e.MarkText = series.XValues[e.ValueIndex].ToString() + " %";
}
}
Thanks,
Best Regards,
Sandra Pazos / 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 |
-
- Newbie
- Posts: 58
- Joined: Thu Jul 05, 2012 12:00 am
Re: Scale And Marks
Thanks, the following has worked:-
line1.GetSeriesMark += new Steema.TeeChart.Styles.Series.GetSeriesMarkEventHandler(line_GetSeriesMark);
line1.GetSeriesMark += new Steema.TeeChart.Styles.Series.GetSeriesMarkEventHandler(line_GetSeriesMark);
Re: Scale And Marks
Hello mikethelad,
I am glad that your problem solved.
Thanks,
I am glad that your problem solved.
Thanks,
Best Regards,
Sandra Pazos / 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 |