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

Re: [ydn-javascript] Problems with Chart

Expand Messages
  • Eric Miraglia
    achievo.yao, Your example seems to work as expected when I plug your code into a sample page. Could you provide more information about what you mean by the
    Message 1 of 2 , Dec 27, 2007
    • 0 Attachment
      achievo.yao,

      Your example seems to work as expected when I plug your code into a sample page.  Could you provide more information about what you mean by the y-axis being "destroyed" in the chart that has style applied?  (What I see is the font changing color as expected in chart1.)

      Regards,
      Eric


      ______________________________________________
      Eric Miraglia
      Yahoo! User Interface Library


      On Dec 26, 2007, at 6:54 PM, achievo.yao wrote:

      Below is my code:
      ============ ========= ========Separate line======== ========= ========= ==
      YAHOO.widget. Chart.SWFURL= 'charts.swf' ; 
      YAHOO.example. monthlyExpenses = [
      { month:"Nov", rate:16000000000 0}, 
      { month:"Dec", rate:20000000000 0},
      { month:"Jan", rate:21000000000 0},
      { month:"Feb", rate:18000000000 0},
      { month:"Mar", rate:14000000000 0},
      { month:"Apr", rate:20000000000 0},
      { month:"May", rate:24000000000 0},
      { month:"Jun", rate:21000000000 0},
      { month:"Jul", rate:20000000000 0},
      { month:"Aug", rate:18000000000 0},
      { month:"Sep", rate:16000000000 0}
      ];
      var myDataSource = new YAHOO.util.DataSour ce(
      YAHOO.example. monthlyExpenses );
      myDataSource. responseType = YAHOO.util.DataSour ce.TYPE_JSARRAY;
      myDataSource. responseSchema ={
      fields: ["month","rate" ]
      };
      var currencyAxis = new YAHOO.widget. NumericAxis( );
      currencyAxis. labelFunction = "formatCurrencyAxis Label";
      var formatCurrencyAxisL abel=function( value){
      return YAHOO.util.Number. format(value, {prefix:
      "$",thousandsSepara tor: ",",decimalPlaces: 2});
      };
      var mychart=new YAHOO.widget. ColumnChart( "chart1", myDataSource,
      {
      xField: "month",
      yField: "rate",
      style:{
      font:{
      color:0x995566
      }
      }
      });
      var myChart2 = new YAHOO.widget. ColumnChart(
      "chart2",myDataSour ce,{xField: "month",yField: "rate"});
      var myChart3 = new YAHOO.widget. ColumnChart(
      "chart3",myDataSour ce,{xField: "month",yField: "rate"});
      var myChart4 = new YAHOO.widget. ColumnChart(
      "chart4",myDataSour ce,{xField: "month",yField: "rate"});
      var myChart5 = new YAHOO.widget. ColumnChart(
      "chart5",myDataSour ce,{xField: "month",yField: "rate"});

      ============ ========= ========Separate line======== ========= ========= ==

      Y-axis of the chart will be destroyed when i use style to the chart.


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