Closed heeryerate closed 2 years ago
Thanks for the comment and for raising the issue!
This works fine on my mac.
To debug the issue, could you tell me the following?
.j.j res3
? (it should look like this "[{\"ts\":\"2020-01-07\",\"y\":0}...
)>new Date("2020-01-07")
Tue Jan 07 2020 09:00:00 GMT+0900 (Japan Standard Time)
@komsit37 Thanks.
I'm working on win7 and default browser is IE 11. Regarding to your question:
<script type="text/javascript"> window.onload = function () { var chart = new CanvasJS.Chart("chartContainer", chartObj); chart.render(); } var chartObj = {"zoomEnabled":true,"axisX":{"labelAngle":-30},"axisY":{"includeZero":false},"toolTip":{"content":"{x}<br/><span style='\"'color: {color};'\"'>{name}</span>: <strong>{y}</strong><br/>{z}"},"data":[{"type":"line","markerType":"none","name":"y","axisYType":"primary","dataPoints":[{"x":"2020-01-07","y":0},{"x":"2020-01-08","y":0.841471},{"x":"2020-01-09","y":0.9092974},{"x":"2020-01-10","y":0.14112},{"x":"2020-01-11","y":-0.7568025},{"x":"2020-01-12","y":-0.9589243},{"x":"2020-01-13","y":-0.2794155},{"x":"2020-01-14","y":0.6569866},{"x":"2020-01-15","y":0.9893582},{"x":"2020-01-16","y":0.4121185}],"showInLegend":true}]}; chartObj.data = formatCanvasJsData(chartObj.data); </script>
>new Date("2020-01-07") [date] Mon Jan 06 2020 19:00:00 GMT-0500 (Eastern Standard Time)[date] Mon Jan 06 2020 19:00:00 GMT-0500 (Eastern Standard Time)
also attribute proto shows [date] Invalid Date?
Sorry I'm not able to show you screenshot, please let me know anything that might help, thanks.
can you try this in your browser console? i'm guessing you have have invalid date or a string in your x
>formatCanvasJsData(chartObj.data)[0].dataPoints[0]
{x: Tue Jan 07 2020 09:00:00 GMT+0900 (Japan Standard Time), y: 0}
do you have chrome or other browsers? can you try to open the same url on those?
Thanks! I should have tried to use chrome. It works well in Chrome. Could you please suggest how to make my chrome default browser when plot? I tried modified/installed package, not work yet.
Ok thanks. Can you help me test the fix in this branch? https://github.com/komsit37/sublime-q/tree/fix-browser-compat
"browser": {
"browser_type": "chrome"
}
Thanks for the great tool!
I tried to plot charts using F4 shortcut, but it can't read date/time.
res2: ([] x: til 10; y: sin(til 10)) \ this works res3: ([] ts: 2020.01.07 + til 10; y: sin(til 10)) \ this doesn't
Could you please suggest? Thanks.