Loading ...
Sorry, an error occurred while loading the content.

Re: Custom label marks for the axis

Expand Messages
  • tripp.bridges
    Hi Oleg, The labelFunction of the axes classes is only used to format the labels. It s usage is explained here:
    Message 1 of 2 , Jan 29, 2009
    • 0 Attachment
      Hi Oleg,

      The labelFunction of the axes classes is only used to format the
      labels. It's usage is explained here:
      http://developer.yahoo.com/yui/charts/#axislabels

      If you are using a TimeAxis
      (http://developer.yahoo.com/yui/docs/YAHOO.widget.TimeAxis.html), you
      can specify a majorTimeUnit of "month" and the labels will be
      displayed by month.

      There are some issues with the calculation of the majorUnit which we
      are fixing in the next release. If you do run into these, you may be
      able to solve it by manually setting the majorUnit.


      var myTimeAxis = new YAHOO.widget.TimeAxis();
      myTimeAxis.majorTimeUnit = "month";
      myTimeAxis.majorUnit = 1;

      I hope this helps,

      Thanks,
      Tripp

      --- In ydn-javascript@yahoogroups.com, "j2eedesigner"
      <j2eedesigner@...> wrote:
      >
      > Hi,
      >
      > I have a line chart with a year statistic. There are two points for each
      > day on it. I don't wont to display all of the labels on the axis. Are
      > there any way to display, for example, one label for each month?
      > It looks like that there should be a way to handle this stuff on
      > javascript using YAHOO.widget.Axis.labelFunction. But I have no idea for
      > this [:(]
      >
      > Best regards,
      > Oleg Barmin.
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.