This is a migrated thread and some comments may be shown as answers.

Basic Chart Properties Help

4 Answers 47 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Brian
Top achievements
Rank 1
Brian asked on 12 Jul 2011, 11:02 PM
I have a chart (see attached pic) and I'm trying to get it cleaned up to look as I would like it to.  I would like to do two things with the attached chart:
1) The first and last points are on the axis line.  Can I move the first axis point for '07-06-11' in a bit on the left so that it is not right on the axis line?

2) The chart has 5 sample points for each line.  I only want the Y axis tick marks for each date that actually has a value.  I don't want the in between axis marks like '07-07-11' which do not have a corresponding point.  How can I get rid of these?

Your help is greatly appreciated.
Tks.

4 Answers, 1 is accepted

Sort by
0
Sia
Telerik team
answered on 15 Jul 2011, 12:07 PM
Hello Brian,

Straight to your questions:

1. Please set the X axis layout mode to "Inside" as follows:
RadChart1.DefaultView.ChartArea.AxisX.LayoutMode = AxisLayoutMode.Inside;

2. You can play with the LabelStep property of the X axis as shown in our demo.

Please try these and let us know how it goes.

Regards,
Sia
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
Brian
Top achievements
Rank 1
answered on 15 Jul 2011, 03:03 PM
You answered my first question (thanks!) but not my second.  I do not want random tick marks along the axis, I only want a tick mark where I have a point.  Again, if you see the attached pic, there are only two dates that should be showing up on the axis: one date for each of the points (3 points share the same date).  Is there a way I can set this up so ONLY two dates show up in the graph?
Tks.
0
Brian
Top achievements
Rank 1
answered on 19 Jul 2011, 02:27 PM
Any thoughts on this issue?
0
Sia
Telerik team
answered on 20 Jul 2011, 01:31 PM
Hello Brian,

In your scenario, you have more dates on your X axis because the axis is into strict mode in which the items are drawn from Min to Max using an automatically calculated step depending on the Chart's size and the number of items.

In order to get tick points only where you have a value, you need to use XCategory instead of XValue. But please have in mind that when a series is used in categorical mode, the X axis represents indexed string values and not the actual dates. That means that your points will be placed in the same order as they were added to your collection and you need to take care of having them sorted.

Kind regards,
Sia
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Tags
Chart
Asked by
Brian
Top achievements
Rank 1
Answers by
Sia
Telerik team
Brian
Top achievements
Rank 1
Brian
Top achievements
Rank 1
Share this question
or