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

26482ColumnChart isn't working with TimeAxis

Expand Messages
  • d.zhiharev
    Feb 29, 2008
    • 0 Attachment
      I want to display ColumnChart on TimeAxis, but see nothing.
      For example:
      -----------------------------------------
      var stats = [
      { date: new Date(2000,1,1), value: 1 },
      { date: new Date(2000,1,2), value: 2 },
      { date: new Date(2000,1,5), value: 1 }
      ];

      var myDataSource = new YAHOO.util.DataSource(
      stats, {
      responseType: YAHOO.util.DataSource.TYPE_JSARRAY,
      responseSchema: {fields:["date", "value"]
      }
      });

      //this code displays ColumChart on CategoryAxis - works well
      new YAHOO.widget.ColumnChart("chart1", myDataSource, {
      xField: "date",
      yField: "value"
      });

      //his code displays LineChart on TimeAxis - works well
      new YAHOO.widget.LineChart("chart2", myDataSource, {
      xAxis: new YAHOO.widget.TimeAxis(),
      xField: "date",
      yField: "value"
      });

      //but this code displays only TimeAxis without any chart :(
      new YAHOO.widget.ColumnChart("chart3", myDataSource, {
      xAxis: new YAHOO.widget.TimeAxis(),
      xField: "date",
      yField: "value"
      });
      ----------------------------------------------
      I didn't find any examples of ColumnChart with TimeAxis and didn't
      find any remarks in documentation about this problem.

      Is it possible to use ColumnChart with TimeAxis?
      What should I do?

      Best regards,
      Dmitry Zhiharev
    • Show all 5 messages in this topic