You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Replace flash based charts with jqPlot / Chart.js / Chartist #342
Thanks, I'll look into that yes. If my memory is not mistaken AdminLte uses it, so better not to add more distance for the ones that want AdminLTE in ospos.
@jekkos I gave a quick try to Chart.js, first I sorted out all the js importing with bower and grunt that were not working that fine. Not sure why Chart.js bower support is not right but never mind it's sorted.
I changed one report as test but I face an issue with Chart.js. It looks like requiring HTML5 and canvas and this line $("#report_chart").get(0).getContext("2d"); fails because it cannot find any getContext of undefined:
Uncaught TypeError: Cannot read property 'getContext' of undefined
Here the canvas declaration: <canvas id="report_chart" width="600" height="800"></canvas>.
I'm not familiar with HTML5 declaration and etc., so I would need to read about. But maybe you can give me some quick hint here to understand the magnitude of the issue or if there is something obvious I missed or can fix.
ok might be easy to inspect the jquery object in a javascript console. There you will see what properties the object has and what could be wrong and needs a fixing.
Activity
ais-one commentedon Mar 6, 2016
Another one you can look at is http://www.chartjs.org/
[-]Replace flash based charts with jqPlot[/-][+]Replace flash based charts with jqPlot / Chart.js[/+]daN4cat commentedon Mar 7, 2016
Thanks, I'll look into that yes. If my memory is not mistaken AdminLte uses it, so better not to add more distance for the ones that want AdminLTE in ospos.
daN4cat commentedon Apr 12, 2016
@jekkos I gave a quick try to Chart.js, first I sorted out all the js importing with bower and grunt that were not working that fine. Not sure why Chart.js bower support is not right but never mind it's sorted.
I changed one report as test but I face an issue with Chart.js. It looks like requiring HTML5 and canvas and this line
$("#report_chart").get(0).getContext("2d");fails because it cannot find any getContext of undefined:Here the canvas declaration:
<canvas id="report_chart" width="600" height="800"></canvas>.I'm not familiar with HTML5 declaration and etc., so I would need to read about. But maybe you can give me some quick hint here to understand the magnitude of the issue or if there is something obvious I missed or can fix.
daN4cat commentedon Apr 12, 2016
OK, I believe I need to check something else first: chartjs/Chart.js#1505
Bower pulled Chart.js 2.0.0-beta and probably the documentation online is for 1.0.0.... mhhh let me check that first!
jekkos commentedon Apr 12, 2016
ok might be easy to inspect the jquery object in a javascript console. There you will see what properties the object has and what could be wrong and needs a fixing.
daN4cat commentedon Apr 12, 2016
Just checked this example: https://github.com/nnnick/Chart.js/blob/v2.0-dev/samples/line.html
I should use that as guideline.
I even noticed that Chart.js requires jQuery 2.x. I don't know if we can upgrade to 2 with no issue?
daN4cat commentedon Apr 12, 2016
I might give a try to jqPlot, it seems more in line with what we have already.
27 remaining items
jekkos commentedon May 24, 2016
Yes I think so, was looking how it worked before and reverted to cfacf52 to see what went wrong
but output looks the same as in current HEAD. Think it's better to do it server side anyway. So what tasks are there left now?
jekkos commentedon May 24, 2016
Otherwise I'll just start another story and leave this for you to finish?
daN4cat commentedon May 24, 2016
Yes, I'll finish and fix it adding the tooltip to pie chart too.
Added tooltip support to charts, regen dist files (#342)
daN4cat commentedon May 25, 2016
With this commit I've added tooltip support to charts and solved the % issue as anyway was better to be implemented as part of the tooltip.
Please check the sales chart and let me know if you like the tooltip when you hover over the circle of the value.
Also I've sorted the currency representation reflecting the correct side according to the local configuration.
Added currency to hbar (#342)
Fixed currency support in pie chart (#342)
Made currency showing configurable from the controller (#342)
daN4cat commentedon May 25, 2016
Just few more adjustments around the currency point.
I believe this is completed and can be closed.
odiea commentedon May 25, 2016
Yes the tooltips really pop out.
daN4cat commentedon May 26, 2016
OK, there is still something to do on the responsiveness side.
So not completely closed yet.
Fixed charts responsiveness and Summary placement (#342)
daN4cat commentedon May 26, 2016
OK, responsiveness sorted and Summary section placement with different screen sizes.
I believe this is now done. There will be more I suppose but that's an enhancement story not a replacement one.
Fixed issue with summary section introduced by sharing common id with…