Please Ignore this. It has been resolved using this function:
function addSymbols(e) { var suffixes = ["", "K", "M", "B"]; var order = Math.max(Math.floor(Math.log(Math.abs(e.value)) / Math.log(1000)), 0); if (order > suffixes.length - 1) order = suffixes.length - 1; var suffix = suffixes[order]; return CanvasJS.formatNumber(e.value / Math.pow(1000, order)) + suffix; }
and declaring it in Y axis.
Thank you.
What Happens when you zoom to the graph? This could be because it automatically tries to fit labels it self so text would not overlap. Just add legend instead.
**** UPDATE ****
In combination with your advise and another solution I managed to make it work thanks to you.
So first problem was, as you pointed out, I was not rendering data after retrieving it so I used chart.render(); after getting data.
chart.render();
The next issue was, that only one graph was showing up instead of two. That was caused by me trying to render two graphs with one chart.render(); function instead of two. +++SOLUTION+++. So I called my two graphs chart1 and chart2, and I used this
chart1.render(); chart2.render();
to update graphs and now both graphs are working without the need of resizing window. .
Thank you for your help, I am very pleased to choose this package, not only that it is very nice package, but support is very good too. Thank you to you and your team.
Vishwas,
I have followed your recommendations as instructed and it made a difference. Thank you very much, I am very grateful for still helping with this. One graph, TotalVoltage, worked very well where TotalPower still has the same issue. It must be something that I am doing incorrectly in the code which I need to investigate further. Your recommendation definitely helped and made difference. Makes sense, when you mentioned about it.
@Vishwas R
Thank you kindly for your quick response. I will follow your advice to see if anything will change. I will let you know if I am having the same issue.
Best regards, Saulius