in reply to chart::clicker x-axis text instead of numbers ?
Hi srk2992, Welcome to the monastery.
Chart::Clicker is a powerful and somewhat complex platform for charting and graphing. It's impossible to diagnose your problem properly without seeing your code, so you should please read up on How do I post a question effectively and post a small script that demonstrates your problem.
I can tell you that my implementations have involved a lot of trial and error testing, but here are a few pointers in response to your questions.
Yes, you can use strings for axis labels. You can subclass Chart::Clicker::Axis, or if you want to use a date/time as the tick label, you might be interested in Chart::Clicker::Axis::DateTime.
For spacing, you may have to get creative. I usually take the approach of manipulating a list of values first and then passing it to the Axis class in tick_values.
E.g., you could see what is the maximum number of values per day in your data set, and calculate spacing based on the product of that number times the number of days. Then add a label to your list only for each day, or 1st of the month, or whatever looks good in your chart, then pass the list. You do *not* have to allow Chart::Clicker to make all the decisions.
Sometimes you may even want to insert dummy values in the data set, e.g. repeat the same value for the "missing" daily results when you don't have the full set.
As far as extreme data points -- same approach: push/unshift an empty value onto each end of the list of datapoints, to extend the background of the chart and give your lowest/highest labels room to breathe.
Without knowing your exact circumstances, the only other general advice I can give is to study *all* the examples in the distro's example/ directory.
Hope this helps!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: chart::clicker x-axis text instead of numbers ?
by srk2992 (Initiate) on Dec 16, 2016 at 19:16 UTC | |
by 1nickt (Canon) on Jan 03, 2017 at 13:42 UTC | |
by Anonymous Monk on Jan 31, 2017 at 11:54 UTC |