Hi Janko,
JM> This would be nice and I need something similar too, just not for dates.
JM> So a general solution for labels of any type in x axis (like month
JM> names, for instance) would be very useful.
that was easier than I thought.
WebChartXaxisOption>>ticks:
ticks: aString
self attributesAt: #ticks put: aString
Then in the component with the chart you do:
"These create the necessary options"
chart xaxis; yaxis; legend.
"get the legend out of the diagram"
"container is a WebElement placed where I want the legend"
(chart optionsAt: #legend) container: container id.
(chart options at: #yaxis) max: 700.
(chart options at: #xaxis) ticks:
'[[1, "a"] , [2, "b"], [4, "12. Woche"], 12]' .
(chart options at: #yaxis) ticks:
'[[400, "a few pieces"] , [500, "these are more"],
[600, "5000 is what we want"], [700, "more than we can handle"]]' .
The parameters of ticks are:
'[[originalNumericValue, "anyOldReplacementString"], ....]'
The values must be between min: and max: or in the range of the
numeric values of the data.
'[firstValue, secondValue, ....]'
is an option to determine where you want numerical ticks.
If one (not me) can write up a JS function which computes the strings
from the function, tick: also accepts this.
Though it seemed more elegant to implement tickFormatter: i didn't
understand the comment in protochart.js.
Cheers,
Herbert mailto:
[hidden email]_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida