Closed stinkycheeseman closed 11 years ago
Hello stinky cheese man-
what output are you trying to get?
-c
I would like to get a chart whose x-axis is non-numeric like this: http://humblesoftware.com/flotr2/#!basic-timeline
Except I do not want to pass in a custom formatter. Ideally I could just pass in the string values I would like in the x-axis.
The ticks option ought to get you where you want to go:
Thanks CE,
This is exactly the effect I'd like, though I feel that passing in ["stinkycheeseman", 5] as a datapoint should also work. It doesn't feel natural to me to have to send in a placeholder numeric value only to override it in the "ticks" option.
Flotr.draw(container, [ [ ["stinky", 1], [ "cheese", 2], ["man", 3] ] ]);
should draw a chart where the x-axis contains string values. I think this is much cleaner and more intuitive than
Flotr.draw(container, [ [ [1, 1], [2, 1], [3, 1] ] ], { "ticks": [ [1, "stinky"], [2, "cheese"], [3, "man"] ] });
(for the record I don't want to seem really critical, I think this library is great and you've done a wonderful job with it)
No worries, thank you for the feedback! Much of the API (like this portion) was inherited from the original Flotr, so it'll stay as-is unfortunately. The graphing packages of the future will have much cleaner APIs to be certain.
Cool- what's the expected timeframe for these packages of the future?
I was speaking more in general! I don't have or know a specific timeframe.
Marking this one resolved!
Hey-
I would get a lot of value out of the ability to plot with x-axis values being strings. Is there any plan on implementing this functionality?
Eg: [ [ "apples", 40], ["bananas": 23], ["carrots": 19] ]