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

[Solved] A few "how do I do this" questions about the chart control

1 Answer 24 Views
Chart
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Igor
Top achievements
Rank 1
Igor asked on 02 May 2012, 05:05 AM
1.  I would like for a chart to self-adjust itself to display data only within the last 1hr.  I've configured the setInterval() function in javascript to run and update the 'data' dictionary of every series.  However, I am struggling with setting the Min and Max values for the CategoryAxis, which is I believe is what I need to do in order to display a fixed window of data

2.  I would like to display the legend but I would also like to provide the size to the legend area.  Currently, my PlotArea is competing with the Legend area. I need to show 10-12 charts on one screen and want them all to be of one size. Is this possible?

3.  Is there any documentation on the Format() property for the labels on the CategoryAxis?  I would like to display my labels in a format of: "hh:mm" where hh and mm are hours and minutes.  Is this even possible?

Thank you for your assistance.

1 Answer, 1 is accepted

Sort by
0
Iliana Dyankova
Telerik team
answered on 04 May 2012, 04:27 PM
Hello Igor,

Straight to your question: 
  1. The Category Axis is used to set category names and there are not values as Min and Max; 
  2. You can not set a width to the Legend Area, but as a possible workaround I would suggest to configure its margin. This way you could specify the place the LegendArea takes. For example: 
    @(Html.Telerik().Chart(Model)
       .Name("chart")
       .Legend(legend => legend
          .Margin(0, 65, 0, 15))
        ...
    )
  3. I am afraid that documentation about this topic is not available. The good news is that in Q2 2012 official release there will be a date axis, which will allow you to display the labels in the desired format.  

I hope this helps.

Regards,
Iliana Nikolova
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now.
Tags
Chart
Asked by
Igor
Top achievements
Rank 1
Answers by
Iliana Dyankova
Telerik team
Share this question
or