Note that there are some explanatory texts on larger screens.

plurals
  1. POhighcharts: issues
    primarykey
    data
    text
    <p>I'm making an app with highcharts, after having many problems I finally make plotted but now takes the correct data but I need to make some adjustments.</p> <p>for example if an user registers a new log on the same day it should take the cost of the log and add it to the logs of the same day or simply show if there are no more, I follow the <a href="http://railscasts.com/episodes/223-charts?view=asciicast" rel="nofollow noreferrer">railcast episode 223</a> and helpme a little. but my issue is: when I add a new log it create a new bar: (there are only 2 logs, I'm gonna create a new log) <img src="https://i.stack.imgur.com/YlVh4.png" alt="enter image description here"> here is that my app do. <img src="https://i.stack.imgur.com/7lhD1.png" alt="enter image description here"></p> <p>also I need to fix the datetime, here is my code:</p> <pre><code> $(function () { new Highcharts.Chart({ chart: { renderTo: 'foo_chart',defaultSeriesType: 'column' }, title: { text: 'tanking costs daily' }, xAxis: { type: 'datetime' }, yAxis: { title: { text: 'cost' } }, tooltip: { formatter: function () { return Highcharts.dateFormat("%B %e %Y", this.x) + ': ' + '$' + Highcharts.numberFormat(this.y, 2); } }, series: [{ name: 'Days', pointInterval: &lt;%= 1.day * 1000 %&gt;, pointStart: &lt;%= 1.weeks.ago.at_midnight.to_i * 1000 %&gt;, data:[ &lt;% for tankinglog in @tankinglog %&gt; &lt;%= "(" + tankinglog.cost.to_f.round(2).to_s + "),"%&gt; &lt;% end %&gt; ] }] }); }); </code></pre> <p>if you see the list on the picture I have 3 logs...the last 2 logs have the same date these must appear in the same bar with the sum of their costs</p>
    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.
 

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