Thanks for the reply.

Before doing any manipulation I wanted to check if I can avoid it. I would like non-intelligent behavior as of MS Excel where I can just treat the x-axis as text axis and can write any thing on it.

My code is roughly as below. The values in the keys are date that I pick up from some other scripts.

use strict; use Chart::Clicker; use Chart::Clicker::Data::Series; use Chart::Clicker::Data::DataSet; my $cc = Chart::Clicker->new; my $series = Chart::Clicker::Data::Series->new( values => [ 1, 2, 3, 4, 5], keys => [ 20161201, 20161201, 20161202, 20161203,20161204 ], ); my $ctx = $cc->get_context('default'); $ctx->domain_axis->format('%s'); my $ds = Chart::Clicker::Data::DataSet->new(series => [ $series ]); $cc->add_to_datasets($ds); $cc->write_output('foo.png');

I get the key values in the format of yyyymmdd from other script that I don't maintain.

The key values can be date or it can be git commits hash which can be strings like a4dsfe. If I put these then the script gives me error.

I even tried by replacing $ctx->domain_axis->format('%s'); in the above code with

$ctx->domain_axis(Chart::Clicker::Axis->new(position => 'bottom', orie +ntation => 'horizontal',format => '%s'));

Attribute (keys) does not pass the type constraint because: Validation failed for 'ArrayRefNum' with value ARRAY(0x6c992f8) at cons tructor Chart::Clicker::Data::Series::new (defined at C:/Perl64/site/lib/Chart/Clicker/Data/Series.pm line 112) line 13. Chart::Clicker::Data::Series::new('Chart::Clicker::Data::Series', 'values', 'ARRAY(0x6d4b820)', 'keys', 'ARRAY(0x6c992f8)') called at

Another question on Chart::Clicker::Axis::DateTime is it needs time in which format? For example if I've values in yyyymmdd format, How do I convert to format that is acceptable?

In reply to Re^2: chart::clicker x-axis text instead of numbers ? by srk2992
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.