Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>It's not a bug. Google Visualisation API has changed.</p> <p>At <a href="http://code.google.com/apis/chart/interactive/docs/customizing_axes.html#Help">http://code.google.com/apis/chart/interactive/docs/customizing_axes.html#Help</a> they post some solutions to this problem. Using option:</p> <pre><code>strictFirstColumnType: false </code></pre> <p>can only be used as a temporary solution. Google says:</p> <blockquote> <p>However, please bare in mind that this option is only available for limited time and will be removed in the near future.</p> </blockquote> <p>The recommended solution is that you change your Date fields on x axis to String. I've achieved this by using formatter before adding value to the DateTable object.</p> <pre><code>var formatterMoney = new google.visualization.NumberFormat({suffix: ' zł', decimalSymbol: ',', groupingSymbol: ' '}); var formatterDate = new google.visualization.DateFormat({pattern: 'dd.MM.yyyy'}); var data = new google.visualization.DataTable(); data.addColumn('string', 'order date'); //used to be date field here data.addColumn('number', 'total amount'); data.addRow([formatterDate.formatValue(new Date('2011-12-20')),971793.93]); //used to be Date object, now is Date formated as String data.addRow([formatterDate.formatValue(new Date('2011-11-30')),1.0]); data.addRow([formatterDate.formatValue(new Date('2011-11-17')),1.0]); data.addRow([formatterDate.formatValue(new Date('2011-10-27')),1.72]); data.addRow([formatterDate.formatValue(new Date('2011-10-26')),10.27]); var chart = new google.visualization.ColumnChart(document.getElementById('chart_div')); formatterMoney.format(data, 1); chart.draw(data, {width: window.width, height: 400, hAxis: {direction: -1}}); </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload