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.
Hi Claude,
The suggestion given above will work, but for that we have to hard code custom strings.If the objective is just to give a clean representation,then instead of giving alternate lables we can use the depth label feature of the graph.In this the labels will be displayed in a manner which gives a clear and neat picture.
It can be handled from javascript.
var objChart = document.appPopulation.getChartObject(); // appPopulation is the name of the applet
now chart object is assigned to variable objChart. then do
objChart.setXAxisLabelDepth(2); // depth can be set to 2,3,4 ... that defines the depth level
document.appPopulation.refresh();
then clear the java console and refersh the applet.
This will set the depth for the labels.So there will not be any overlapping of labels.
Regards
Pradeep
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| 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.