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

Label of Category Axe

5 Answers 138 Views
Report Designer (standalone)
This is a migrated thread and some comments may be shown as answers.
Michele
Top achievements
Rank 1
Michele asked on 04 Jun 2014, 02:24 PM
I need to draw a Trend Graph with a date time value on the X Axe and a Value on the Y Axe.
I have many samples (1000) within a short period less (10 minutes) and I'd like to see an entry in the graph at every second.

DateTime Scale doesn't allow to use seconds so I choose the Category Graph option but I cannot limit the number of labels of the X Axe that will be too much (1000).

Is there any way to solve my issue either with DateTime Scale or with Category Scale?


Michele 

5 Answers, 1 is accepted

Sort by
0
Ivan Hristov
Telerik team
answered on 06 Jun 2014, 11:32 AM
Hello Michele,

We have already answered to your question in support ticket #826279, but we will the answer here as well for anyone concerned.
We would like to kindly ask you to use just one support channel to contact us. Posting the same questions numerous times slows down our response time because we will need to review and address two threads instead of one.

Thank you for your understanding.

Now to your question:
In the upcoming Q2 release of Telerik Reporting we plan to introduce Seconds as the smallest base unit for the DateTime scale. This feature has successfully passed the QA stage and unless some unexpected changes occur, it will be included in the new release, which will be published later this month. As soon as we are ready, we will introduce the new features and improved functionalities on our What's New page, so you can check it occasionally.


Regards,
Ivan Hristov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Michele
Top achievements
Rank 1
answered on 06 Jun 2014, 02:25 PM
Dear Ivan,
sorry for that but I didn't post the same question in two support channels.

I did post 2 questions on the forum channel, never used a ticket.

Moreover the 2 questions are a bit different, on this one I also asked if there is any way to programmatically reduce the number of labels when using a Category scale.

Best Regards
Mcihele
0
Ivan Hristov
Telerik team
answered on 06 Jun 2014, 03:48 PM
Hello Michele,

I'm sorry for the confusion caused by overlooking the details in the current forum post. However, we would recommend you to use our support system, because its tickets are processed with a higher priority than forum threads.

We wouldn't recommend you to use the CategoryScale to display a continuous timespan, because your points will not get distributed properly if they are not measured at equal intervals. Also it lacks the LabelStep property, which is present in the Numerical and DateTime scales.

A better option is to use the NumericalScale and present your seconds data as decimal numbers. You can then create a CalculatedField and use it as a X value of your chart. In this case you will be able to reduce the amount of labels on the axis through the LabelStep property of the NumericalScale.

If you have further questions, please let us know.

Regards,
Ivan Hristov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Michele
Top achievements
Rank 1
answered on 06 Jun 2014, 04:30 PM
Thanks Ivan,


I can calculate X Axis values by calculating the amount of seconds from the start of the trend but
how can I set the Label to show a time with hh:mm:ss ?

Michele
0
Ivan Hristov
Telerik team
answered on 09 Jun 2014, 08:59 AM
Hi Michele,

When using the Numerical Scale, you cannot set a DateTime format on your axis labels, because the presented data is of a numeric type. You can set a custom label expression when you are using a CategoryScale, but, again, this scale does not provide a LabelStep property. Instead, you can write an expression for your CategoryGroup.Label that returns a valid output on every minute and an empty string otherwise.

Please take a look at the attached .trdx example, which shows how to create a Calculated Field and use it in a line chart. The example also shows how to write the fore-mentioned Label expression so your labels appear on every minute. Although the example uses only static data, it is connected to the AdventureWorks sample database, so you may need to reconfigure the SqlDataSource component according to your MSSQL server settings, attaching it to any MSSQL database you have.

Hope it helps.

Regards,
Ivan Hristov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Report Designer (standalone)
Asked by
Michele
Top achievements
Rank 1
Answers by
Ivan Hristov
Telerik team
Michele
Top achievements
Rank 1
Share this question
or