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!


The way forward always starts with a minimal test.

In reply to Re: chart::clicker x-axis text instead of numbers ? by 1nickt
in thread chart::clicker x-axis text instead of numbers ? by srk2992

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.