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

Date label rendering with alternate pattern on x-axis in line chart series

2 Answers 102 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.
Deepak
Top achievements
Rank 1
Deepak asked on 09 Jul 2015, 05:26 AM

Hi,

 Please can you guide me with this issue, I have also attached the screen shot for better understanding. I want to render date labels with "two line format" first line day and month name then in second line time value. How this can be achieved. I have checked with chartLabelRenderer but did not found much regarding this.

 

Also the rendering should happen alternatively on x-axis, So that when I render it for first tick then second tick should be left empty and third tick should render the date label like wise will be followed for rest all other ticks, And I also want to limit the number of ticks that will render on the x axis.

 

Thanks,

2 Answers, 1 is accepted

Sort by
0
Deepak
Top achievements
Rank 1
answered on 09 Jul 2015, 10:46 AM

Hi Telerik support Team,

please can you look in to this on priority.

Thanks,

0
Victor
Telerik team
answered on 11 Jul 2015, 12:09 PM
Hi Deepak,

You can render the date string by setting a date format:

Please note that rendering a single label on multiple lines is not possible at them moment. If the labels overlap each other different labels can rendered on different lines so that they don't overlap however a single label is always on one line.

You can tell your axis to skip every other label like this:
axis.setDateTimeFormat(new SimpleDateFormat("dd MMM hh:mm aaa"));

To skip more labels increase the argument number.
axis.setLabelInterval(2);

Also you can use the label fit mode strategies if the labels become too cramped:
weekHorizontalAxis.setLabelFitMode(AxisLabelFitMode.MULTI_LINE);
The fit modes can be multi-line, rotate and none.

Please write again if you need further assistance.


Regards,
Victor
Telerik
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
Chart
Asked by
Deepak
Top achievements
Rank 1
Answers by
Deepak
Top achievements
Rank 1
Victor
Telerik team
Share this question
or