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

Line chart problem

6 Answers 83 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Shiwani
Top achievements
Rank 1
Shiwani asked on 06 Feb 2017, 12:50 PM
Line chart does not show any line or dot for a single value of X Axis.

6 Answers, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 06 Feb 2017, 06:09 PM
Hi Shiwani,

This is the expected behavior when you use DatetimeScale, NumeriScale or LogarithmicScale due to the way ranges are calculated. You will have to set the scale's Minimum and Maximum properties e.g. Graph item with DateTimeScale and one category slot displays only the first date of the year.

Regards,
Stef
Telerik by Progress
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Shiwani
Top achievements
Rank 1
answered on 07 Feb 2017, 06:14 AM

Hi Stef,

Thank you for reply.

I have changed scale value from category to DateTimeScale but now the chart is not showing preview and run time i am getting an error.

0
Shiwani
Top achievements
Rank 1
answered on 07 Feb 2017, 06:26 AM

How can i set BaseUnit for the dateTime Scale in telerik designer, in your given link this is set by C# code (public DateTimeScaleUnits BaseUnit { get; set; }).

please guide me.

0
Ivan Hristov
Telerik team
answered on 09 Feb 2017, 01:39 PM
Hello Shiwani,

To set the scale units in designer please follow the steps below:

1. Click on the graph axis in the designer area. The axis gets selected and Property Grid lists its properties (see attached screenshot 1.png).

 2. Locate the Scale property and expand it by clicking on the arrow on its left (see attached screenshot 2.png).

3. Set up the BaseUnit property as needed for your data. Note that this property is specific to the DateTime scale and it doesn't exist in other scales (Numerical, Logarithmic, Category).

The same approach can be used if you select the Graph item and then open its GraphCoordinateSystem Collection Editor by clicking on the ellipsis button on the right of the CoordinateSystems property (see attached screenshot 3.png). The editor will open and you can expand the X or Y axis properties in order to get to the scale.

Additionally your chart fails to render because when working with DateTime, Numerical or Logarithmic scale, you need to set values for X and Y properties of your series. This is not necessary when working with Category scale, because the position of each data point on the scale is determined by its category grouping value.

Hope it helps.

Regards,
Ivan Hristov
Telerik by Progress
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Shiwani
Top achievements
Rank 1
answered on 10 Feb 2017, 06:05 AM

Thanks for reply,it helped me to understand.

In my line chart, i am using week number of month on x axis, so by default the scale is category scale. And if i am going to change it , it is showing an error in report rum time.

So i think the category scale is not a problem.

so what should i do for the problem , i have defined.

0
Ivan Hristov
Telerik team
answered on 13 Feb 2017, 09:30 AM
Hello Shiwani,

If in your X axis you are displaying a week number, then you don't need a DateTime scale, because you are not showing a datetime value (therefore you don't need to set a BaseUnit, since it is supported in DateTime scale only). In this case the CategoryScale should do fine. However, if you want to present the week numbers in a continuous domain, you can try to set a NumericalScale for your X axis, but keep in mind that in this case you also have to set your series' X property.

Please take a look at the following articles for more information:

How to: Create Line Chart
How to: Change the Axis Scale

Regards,
Ivan Hristov
Telerik by Progress
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Shiwani
Top achievements
Rank 1
Answers by
Stef
Telerik team
Shiwani
Top achievements
Rank 1
Ivan Hristov
Telerik team
Share this question
or