Unplanned
Last Updated: 03 Jan 2017 21:01 by ADMIN
Louis
Created on: 27 Jan 2014 22:34
Category: ChartView
Type: Feature Request
2
ChartView: Make LabelInterval adjust correctly when MajorTickInterval is adjusted
When setting MajorTickInterval, the actual interval used in display is adjusted when zooming to show a reasonable number of ticks. However, if LabelInterval is used along with it to achieve the desired number of labels on the chart, LabelInterval is not adjusted along with MajorTickInterval, resulting in too many or too few labels being displayed. Moreover the automatic adjustment of MajorTickInterval cannot be disabled, leading to problematic label display that cannot easily be handled by the developer without inside knowledge of the algorithm. 

Nice features would be:
- Adjust LabelInterval along with MajorTickInterval to keep approximately the same number of labels on the chart.
- Given the above, add an option to allow the Chart to determine the optimal MajorTickInterval and LabelInterval by itself (currently if MajorTickInterval is not specified, it displays ALL category ticks which can be way too many for the display)
- Add an option to disable the MajorTickInterval automatic adjustment if the programmer wishes to handle this manually

This suggestion arose out of this forum thread, which includes an example demonstrating the issue:

http://www.telerik.com/forums/majortickinterval-trouble-when-zooming
7 comments
ADMIN
Petar Marchev
Posted on: 08 Apr 2014 16:10
Excuse me for the incorrect link, below you will find the correct one:
http://feedback.telerik.com/Project/143/Feedback/Details/125384-implement-a-new-axis-label-fit-mode-skip-in-order-to-avoid-label-overlapping
ADMIN
Petar Marchev
Posted on: 08 Apr 2014 16:01
And a quick follow up, you may want to vote for this new LabelFitMode:
http://tpdogfood.telerik.com/view#item/96774
ADMIN
Petar Marchev
Posted on: 08 Apr 2014 15:59
Louis, 

Thank you very much. I am giving a green light on this.

Best Regards,
Petar Marchev, Telerik.
Louis
Posted on: 07 Apr 2014 16:02
Yes, a DesiredTickCount would work as it could be used along with LableInterval to maintain an acceptable number of labels on an axis. It would still be nice to have 2) to automatically make things look good based on the label attributes chosen (to reduce the number so they don't overlap), but I understand this is a much more difficult enhancement. Thanks!
ADMIN
Petar Marchev
Posted on: 07 Apr 2014 10:01
Hi Louis,

"I think you're referring to LabelInterval here.."
Whoops, you got me! I did make a mistake here and I do see your point. 

Do you then perhaps mean that you would like to see a DesiredTicksCount property?

Louis
Posted on: 04 Apr 2014 17:11
Hi Petar,

You can look at the link to a forum post in my original post for more details including the code that demonstrates the issue. 

1. The example shows the problem using a CategoricalAxis, but I have seen it for a DateTimeCategoricalAxis as well. 

"Currenlty the chart always respects the MajorTickInterval property, with and without zooming. The property specifies that only 1 in n ticks will have a label." - I think you're referring to LabelInterval here, which indeed is always respected. MajorTickInterval is not respected, as the example shows.

2. You are correct, this is something you don't have yet. LabelFitMode is nice, but the number of ticks changes drastically when zooming, it is inadequate to maintain good looking charts.

Again thanks for looking at this, and please let me know if you have any more questions.

Louis
ADMIN
Petar Marchev
Posted on: 04 Apr 2014 15:53
Hi Louis, 

First of all I would like to thank you for the feedback and suggestions. 

1. Adjust LabelInterval along with MajorTickInterval to keep approximately the same number of labels on the chart.

Can you please provide us with more details on this? Can you confirm that you are talking about a DateTimeCategoricalAxis? Currenlty the chart always respects the MajorTickInterval property, with and without zooming. The property specifies that only 1 in n ticks will have a label. We are not sure that we want to disrespect this setting while zooming the chart. So I will ask that you provide us with more information, such as snapshots (drawings of some sort) that describe what behavior you need to get. 


2. Given the above, add an option to allow the Chart to determine the optimal MajorTickInterval and LabelInterval by itself (currently if MajorTickInterval is not specified, it displays ALL category ticks which can be way too many for the display)

I think that you are talking about a feature that is not yet present in the ChartView, the automatic step of the axis that avoids labels overlapping. We have not implemented this, but we have a LabelFitMode property of the axis which helps to avoid label overlapping. 


3. Add an option to disable the MajorTickInterval automatic adjustment if the programmer wishes to handle this manually

This is something I totally agree with. We have seen that in many cases it would be much better to disable this functionality, rather than fight against it. This one definitely gets a green light.


I cannot yet commit to the first two suggestions, though. I will ask that you give us more details so that we better understand the proposals.