on ‎2007 Nov 22 7:13 AM
Hi All,
I want to write a javascript for an iChart Applet where i can define the gap after which x-axis label should appear.
For example, if i am plotting a chart of population in a country for all year. I want to show all the bars for 12 months, however, i want to display labels for 1st, 4th, 7th, 10th, 12th bar only. So, that the chart looks neat.
Thanks.
Request clarification before answering.
Claude,
By default, the iChart will always display a label for the first and last item, so in your example the 1st and 12th bars should have one, and bar mode will typically show a label for each bar. If you change your XAxisTicksPerLabel setting to 3 shouldn't the remaining items get the labels you desire? If this doesn't work with the standard Bar or GroupBar mode, then switch to Custom mode and make your pen types Bar on the pen details tab and the ticks per label should work. Using the ticks per label will allow the dataset to drive the display items, whereas CustomLabels are just hard-coded custom strings.
Regards,
Jeremy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your inputs Jeremy.
However, I am not been able to do that. XAxisTicksPerLabel is not having any effect on the output.
@Jeremy/Vijaya
Talking about Custum Labels, I guess for that the data will be hard-coded, however, my data is coming from the data source for x-axis labelling.
@Pradeep
The Label Depth is an alternative way for making labels look less clustured but consider the case when we are plotting three values against one x-axis column. In such cases, the same label gets repeated and which is just a shear waste of space.
Please correct me if i have misunderstood your comments.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.