highcharts / highcharts

Highcharts JS, the JavaScript charting framework
https://www.highcharts.com
Other
11.87k stars 3.54k forks source link

`minPointLength` is overlapping other stack if `stacking: normal` in column chart #21178

Closed yogeshhrathod closed 1 month ago

yogeshhrathod commented 1 month ago

Description of the feature

I am trying to use minPointLength but after using it, its overlapping the stack in the chart

Highcharts.chart('container', {
    chart: {
        type: 'column'
    },
    title: {
        text: 'Stacked Column Chart with Minimum Size'
    },
    xAxis: {
        categories: ['A', 'B', 'C', 'D']
    },
    yAxis: {
        title: {
            text: 'Total Fruit Count'
        }
    },
    plotOptions: {
        column: {
            stacking: 'normal',
            minPointLength: 15 // Minimum height of each stacked column in pixels
        }
    },
    series: [{
        name: 'Apples',
        data: [100, 2, 1, 2]
    }, {
        name: 'Oranges',
        data: [2, 1, 3, 1]
    }, {
        name: 'Bananas',
        data: [2, 1, 1, 1]
    }]
});

blue stack is overlapped because of minPointLength is more than the actual blue stack. image

example:

https://jsfiddle.net/y2a9bo7s/

bm64 commented 1 month ago

Hi @yogeshhrathod

There's already a ticket with detailed explanations of the problem and possible solutions. Please refer to the topic and continue the discussion there: https://github.com/highcharts/highcharts/issues/1776

Closing as a duplicate of #1776