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

Re: [ydn-javascript] Source code availableRe: YUI Chart TimeAxis Formatting - only last 3 dates shown

Expand Messages
  • Eric Miraglia
    Arun, Thanks for sharing. This is up on our Twitter feed -- http://twitter.com/yuilibrary/status/2922144634 -- and it will be in our next installment of In
    Message 1 of 11 , Jul 29, 2009
    • 0 Attachment
      Arun,

      Thanks for sharing.  This is up on our Twitter feed --


      -- and it will be in our next installment of "In the Wild".

      -Eric


      From: Arun Gupta <arun.gupta@...>
      To: ydn-javascript@yahoogroups.com
      Sent: Wednesday, July 29, 2009 6:07:38 AM
      Subject: [ydn-javascript] Source code availableRe: YUI Chart TimeAxis Formatting - only last 3 dates shown

       

      The complete app, including the source code and image snapshots, is available at:

      http://blogs. sun.com/arungupt a/entry/track_ your_running_ miles_using

      It shows how YUI is integrated with Rails.

      Thanks,
      -Arun

      --- In ydn-javascript@ yahoogroups. com, "Arun Gupta" <arun.gupta@ ...> wrote:
      >
      > Excellent, that nailed it for me.
      >
      > The sample doc at http://developer. yahoo.com/ yui/charts/ #axislabels threw me off.
      >
      > I'll post a pointer to the forum once my application goes live hopefully in few days.
      >
      > Thanks,
      > -Arun
      >
      > --- In ydn-javascript@ yahoogroups. com, Dwight Bridges <trippb@> wrote:
      > >
      > > The format argument needs to be of type object with a property of format:
      > >
      > > var formatDateAxisLabel = function(value)
      > > {
      > > return YAHOO.util.Date. format(value, {format:"%b %d"}, "en-US");
      > > }
      > >
      > > That will do it.
      > >
      > > Tripp
      > >
      > > On 7/20/09 2:58 PM, "Arun Gupta" <arun.gupta@ > wrote:
      > >
      > > >
      > > >
      > > >
      > > >
      > > > Ah that got rid of the "last 3 dates" issue. But the specified format is still
      > > > mm/dd/yyyy instead of specifying:
      > > >
      > > > formatDateAxisLabel = function(value)
      > > > {
      > > > return YAHOO.util.Date. format(value, "%b %d", "en-US");
      > > > }
      > > >
      > > > getDateAxisLabel = function() {
      > > > var dateAxis = new YAHOO.widget. TimeAxis( );
      > > > dateAxis.title = "Date";
      > > > dateAxis.labelFunct ion = formatDateAxisLabel ;
      > > > return dateAxis;
      > > > }
      > > >
      > > > I tried with "en" locale as well.
      > > >
      > > > On a side note, how do I automatically set the locale ?
      > > >
      > > > -Arun
      > > >
      > > > --- In ydn-javascript@ yahoogroups. com
      > > > <mailto:ydn- javascript% 40yahoogroups. com> , Dwight Bridges <trippb@> wrote:
      > > >> >
      > > >> > You will need to use a valid date string in your datasource to use the
      > > >> > TimeAxis.
      > > >> >
      > > >> > 2009/01/01 works
      > > >> > 2009-01-01 does not work
      > > >> >
      > > >> > Hope this helps.
      > > >> >
      > > >> > Tripp
      > > >> >
      > > >> >
      > > >
      > > >
      > > >
      > > >
      > > >>
      > >
      >

    Your message has been successfully submitted and would be delivered to recipients shortly.