logo
down
shadow

Highcharts tooltip bug with stacked column chart


Highcharts tooltip bug with stacked column chart

By : tutsies
Date : November 22 2020, 02:59 PM
will help you There seems to be an issue with displaying stacked charts with multiple series, where the series don't have the same number of points. , Upgrading to Highcharts 4.1.10 fixed the issue for me.
code :


Share : facebook icon twitter icon
Add new series to the top of a highcharts stacked column chart

Add new series to the top of a highcharts stacked column chart


By : Mai Quốc Kay
Date : March 29 2020, 07:55 AM
wish helps you You can set index and zIndex to keep order between layers, then add serie with appropriate parameters.
Example: http://jsfiddle.net/6bCBf/5/
code :
var chart = new Highcharts.Chart({

    chart: {
        type: 'column',
        renderTo: 'container'
    },

    xAxis: {
        categories: ['Jan', 'Feb', 'Mar']
    },

    plotOptions: {
        series: {
            stacking: 'normal'
         }
     },    

    series: [
        {
            name: 'base',
            data: [10, 20, 30],
            index:2,
            zIndex:10
        },
        {
            name: 'sec',
            data: [30, 20, 10],
            index:1,
            zIndex:9
        }
    ]
},function(chart){



    $('#add').on('click', function (e) {

        chart.addSeries({
            data: [32, 43, 42],
            index: 0,
            zIndex:1
        });
    });


});
Can highcharts stacked percentage column chart be less than 100%

Can highcharts stacked percentage column chart be less than 100%


By : zerry zun
Date : March 29 2020, 07:55 AM
it fixes the issue Like what @Alden Be said, use stacked column with % labels. Here is the JSFiddle example.
code :
$(function () {
    $('#container').highcharts({
        chart: {
            type: 'column'
        },
        title: {
            text: 'Stacked column chart'
        },
        xAxis: {
            categories: ['Apples', 'Oranges', 'Pears', 'Grapes', 'Bananas'] 
        },
        yAxis: {
            min: 0,
            title: {
                text: 'Percentage'
            },
            labels: {
                formatter: function () {
                    return this.value + '%';
                }
            },
            stackLabels: {
                enabled: true,
                style: {
                    fontWeight: 'bold',
                    color: (Highcharts.theme && Highcharts.theme.textColor) || 'gray'
                },
                formatter: function () {
                    return this.total + '%';
                }
            }
        },
        legend: {
            align: 'right',
            x: -30,
            verticalAlign: 'top',
            y: 25,
            floating: true,
            backgroundColor: (Highcharts.theme && Highcharts.theme.background2) || 'white',
            borderColor: '#CCC',
            borderWidth: 1,
            shadow: false
        },
        tooltip: {
            headerFormat: '<b>{point.x}</b><br/>',
            pointFormat: '{series.name}: {point.y}%<br/>Total: {point.stackTotal}%'
        },
        plotOptions: {
            column: {
                stacking: 'normal',
                dataLabels: {
                    enabled: true,
                    format:'{y}%',
                    color: (Highcharts.theme && Highcharts.theme.dataLabelsColor) || 'white',
                    style: {
                        textShadow: '0 0 3px black'
                    }
                }
            }
        },
        series: [{
            name: 'John',
            data: [5, 3, 4, 7, 2]
        }, {
            name: 'Jane',
            data: [2, 2, 3, 2, 1]
        }, {
            name: 'Joe',
            data: [3, 4, 4, 2, 5]
        }]
    });
});
stacked group column chart in highcharts example

stacked group column chart in highcharts example


By : Dolanium
Date : March 29 2020, 07:55 AM
Any of those help You can achieve this using Stacked Group in Highchart by handling data section properly.
Here, I tried to build same chart as you required. You can handle legend and other of the chart.
code :
Highcharts.chart('container', {

  chart: {
    type: 'column'
  },

  title: {
    text: ''
  },
  
  legend: {
    enabled: false
  },

  xAxis: {
    categories: [
      ['19603', '19666'], '19603', '19603'
    ]
  },

  yAxis: {
    title: {
      text: 'Good or Bad'
    }
  },

  plotOptions: {
    column: {
      stacking: 'percent'
    }
  },

  series: [{
    name: 'Jane',
    data: [244, 23, 4],
    stack: '19603'
  }, {
    name: 'John',
    data: [306, 522, 546],
    stack: '19603'
  }, {
    name: 'Jane',
    data: [376],
    stack: 'female'
  }, {
    name: 'Janet',
    data: [174],
    stack: 'female'
  }]
});
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>

<div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>
Functionality in highcharts which support a spline chart and inverted stacked column in a same chart

Functionality in highcharts which support a spline chart and inverted stacked column in a same chart


By : user3340834
Date : March 29 2020, 07:55 AM
it should still fix some issue Do we have functionality in highcharts which support a spline chart and inverted stacked column in a same chart like the below chart? If yes, Can you please provide some code samples? I have given a mock image below. , You can use spline and xrange series types with multiple yAxis:
code :
series: [{
    type: 'spline',
    data: [...]
}, {
    type: 'xrange',
    yAxis: 1,
    data: [...]
}],
yAxis: [{
    height: '50%',
    offset: 0
}, {
    height: '50%',
    top: '50%',
    offset: 0
}]
How to plot a Stacked column chart using highcharts?

How to plot a Stacked column chart using highcharts?


By : Eraj
Date : March 29 2020, 07:55 AM
wish of those help Mike Zavarello has described your issue in detail.
If you can't (or don't want to) format your data, the function below will do this for you.
code :
chart: {
    type: 'column',
    events: {
      load: function() {
        var chart = this,
          categories = [],
          series = [];
        data.forEach(function(elem) {
          if (!categories.includes(elem[0])) {
            categories.push(elem[0])
          }
        })
        data.forEach(function(elemData) {
          series.push({
            name: elemData[2],
            data: (function() {
              var dataPoints = [];
              categories.forEach(function() {
                dataPoints.push(0)
              })
              categories.forEach(function(elemCategories, j) {
                if (elemCategories == elemData[0]) {
                  dataPoints[j] = elemData[1]
                }
              })
              return dataPoints
            })()
          })
        })
        chart.update({
          series: series,
          xAxis: {
            categories: categories
          }
        }, true, true)
      }
    }
  },
Related Posts Related Posts :
  • Can I disable sorting in dgrid for performance gain?
  • Which tools (that are not plugins) can be used to create animation which can be manipulated at runtime?
  • Boostrap carousel not working
  • Ember controllers in nested routes
  • How to reload ng-include in AngularJS?
  • Add enter on event in javascript
  • How to set different background color for each repeated column of RadioButtonList
  • Angular filter data by date
  • Showing multiple info boxes in Google Maps when pulling from MySQL
  • Cordova event DeviceReady don't work on all pages
  • JavaScript document object lastModified using toLocale string
  • TypeError: $(...).autocomplete is not a function $("#partipnt-name").autocomplete({
  • Javascript isnan issue
  • Change variance on mouse movement
  • Highcharts - set xAxis range when using xAxis Categories?
  • Typeahead 0.11.1 Mouse over and keyboard conflict when viewing dropdown search results
  • How to use data from $http.get after page load in Vue.js?
  • How to test angular promise with Jasmine
  • Conditionally chain functions in JavaScript
  • Using QueryBuilder and getting "QueryBuilder is not defined" error
  • slideToggle with bounce effect not working
  • AngularJS binding two variables together without being told to do so
  • Anchor doesn't work
  • set different values for drop down list if check box checked or unchecked
  • Fullscreen slide-toggle with cookie
  • Set variable if input field contains text
  • signin with Linkedin code give me html validation error
  • how to call a jquery function from a form
  • iron router reload specific header element
  • .submit function not running when invalid with kendo validator
  • How to use bind() in JS object init
  • AngularJS Application Declaration?
  • Callback function not invoked in js
  • Connect to Oracle DB from JavaScript
  • Google Maps API: Want geolocation to click automatically on data layer below
  • getJSON alert not returning anything - data issue?
  • rxjs observables lifecycle : detecting a completed observable
  • Merging search terms from 2 separate input fields
  • Angular $scope function not working outside of ng-repeat
  • Array field referenced to another class Array filed doesn't refresh
  • How to get current row cell value
  • jQuery - Loop Through TD widths and then Loop through TH and apply TD widths
  • Create segmented control-like with animation
  • Where to put "a lot" of data, array / file / somewhere else, in JS on node.js
  • can I filter a countBy in lodash?
  • JavaScript - Performing a recursive search, value not being retained
  • How to auto hide multiple alerts one by one. first in - first out?
  • EJS failing to render template
  • Asynchronous code in custom ESLint rules
  • Dart with RIkuloUI. Why is there no output?
  • ng-idle cannot read a property
  • Directive scope not updated on async
  • How do I get the value of an item in a drop down menu list using javascript?
  • Extended execution does not seem to work in Windows 10 Universal JavaScript apps
  • Directory structure for parallel development: Dart and Javascript
  • How to dynamically select the option for dynamically added select/option tag
  • Callbacks in JavaScript
  • gulp-minify without rename original files
  • create a link to run javascript in another window
  • Javascript, Uncaught TypeError: Cannot read property "cells" of undefined
  • shadow
    Privacy Policy - Terms - Contact Us © animezone.co