Using strings as X axis reference with DBTeechart
-
- Newbie
- Posts: 2
- Joined: Tue Jan 30, 2007 12:00 am
Using strings as X axis reference with DBTeechart
Using DBTeeChart 7.08, I have to generate a chart that represents Total Sales per Magazine issue. The problem is that the issues are represented by strings, example 'Vol 1, no. 1', 'Vol 1, no. 2', the 'Special issue 3', etc...
My query retrieves records in the proper order. How can I design the chart to have the issue string in the X axis?
PS. I am using the chart inside ReportBuilder 10.5.
Thanks
Salim
My query retrieves records in the proper order. How can I design the chart to have the issue string in the X axis?
PS. I am using the chart inside ReportBuilder 10.5.
Thanks
Salim
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Salim,
You could assign the issues strings as Labels, and total sales per issue as Values. That way, the chart will automatically add sequential x values (0, 1, 2, ...) but labels will be displayed in the bottom axis.
You could assign the issues strings as Labels, and total sales per issue as Values. That way, the chart will automatically add sequential x values (0, 1, 2, ...) but labels will be displayed in the bottom axis.
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: 2
- Joined: Tue Jan 30, 2007 12:00 am
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Salim,
You're very welcome! I'm glad to hear this helped.
No, mandatory values are Y values. If no X values are provided TeeChart automatically adds them.
You're very welcome! I'm glad to hear this helped.
No, mandatory values are Y values. If no X values are provided TeeChart automatically adds them.
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, I did what you said but I have to face a new problem: the marks are automatically setting to the label's value:
And this is my code:
FastLine fl1 = new FastLine();
fl1.YValues.DataMember = ds.Tables[0].Columns[1].ToString();
fl1.LabelMember = ds.Tables[0].Columns[0].ToString();
fl1.DataSource = ds.Tables[0];
fl1.Marks.Visible = true;
///////////////////////////////////////////////
Plz help me.
And this is my code:
FastLine fl1 = new FastLine();
fl1.YValues.DataMember = ds.Tables[0].Columns[1].ToString();
fl1.LabelMember = ds.Tables[0].Columns[0].ToString();
fl1.DataSource = ds.Tables[0];
fl1.Marks.Visible = true;
///////////////////////////////////////////////
Plz help me.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Dautm,
You can set marks to display values like this:
You can set marks to display values like this:
Code: Select all
Series1.Marks.Style := smsValue;
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 |
Thank you so much. I put: fl1.Marks.Style=MarksStyles.Value; and it worked .
One more question please, I need to know how to modify the left axis scale because the default scale for my data (values between 0-70), is 10, so I see the following labels: 0,10,20...70 and I want for example to change the scale to 35 and see only 0,35,70.
Thx in advanced!!
One more question please, I need to know how to modify the left axis scale because the default scale for my data (values between 0-70), is 10, so I see the following labels: 0,10,20...70 and I want for example to change the scale to 35 and see only 0,35,70.
Thx in advanced!!
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Dautm,
You're welcome.
To achieve what you request you need to set left axis increment:
More information on how to work with axes is available in Tutorial 4 - Axis Control. You'll find the tutorials at TeeChart's program group.
You're welcome.
To achieve what you request you need to set left axis increment:
Code: Select all
Chart1.Axes.Left.Increment:=75;
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 Dautm,
you can format the value using :
Series1.ValueFormat := '###,###,###.###';
you can format the value using :
Series1.ValueFormat := '###,###,###.###';
Pep Jorge
http://support.steema.com
http://support.steema.com