Posts

Showing posts with the label highcharts

HighCharts: subsequent chart erases previous chart

Image
HighCharts: subsequent chart erases previous chart I am having a problem of creating Highcharts dynamically - from asynchronous ajax calls: sometimes subsequent chart erases previous chart from a different container. This is the scenario: 1. From 6 to 8 charts are created simultaneously from ajax async data. Each chart is assigned to a dynamic array and destroys before rendering: if (charts[chID] != null) { charts[chID].destroy(); } Then we create a chart: charts[chID] = new Highcharts.Chart(chartOptions); As I mentioned all these charts are created simultaneously from async ajax calls. The problem is that some charts are missing after the first run ; after that all charts are rendered properly. Debugging the code shows that the missing charts are actually created, but then erased by subsequent charts. The screenshots from Chrome dev. tools: Three charts (4,5,6) are OK Then another chart (1) is added and erases chart 4: These 'missing' charts happen quite irregularity - som...

Highcharts graph does not update with firebase

Highcharts graph does not update with firebase $scope.hhData = $firebaseArray(aRef.orderByChild('ts').startAt('2018-07-02').limitToLast(50)); $scope.hhData.$loaded().then(function () { $scope.chartSeriesYArray = ; $scope.chartSeriesXArray = ; angular.forEach($scope.hhData, function (value) { $scope.chartSeriesXArray.push(moment(value.ts).format('MMMM Do YYYY, h:mm:ss')); $scope.chartSeriesYArray.push(parseFloat(value.ein)); }); Highcharts.chart('chart', { chart: { type: 'column' }, title: { text: 'Half Hourly Energy Consumption' }, xAxis: { categories: $scope.chartSeriesXArray, crosshair: true }, yAxis: { min: 0, title: ...

Ticks marks are moving upon changing the type of Chart

Image
Ticks marks are moving upon changing the type of Chart I am using Highcharts in AngularJS. My issue is that every time I change the type of graph, the tick marks are moving along the x-axis. I don't want it to move along the x-axis. I want it to be start from the origin. Screenshots: can you provide your code sample for rendering updated charts – Hany Habib 2 days ago 1 Answer 1 Set yAxis.min = 0. yAxis.min PS: Both screenshots are the same. By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.