Удалить пробел на панели ZingChart

Я делаю здесь диаграмму, и у меня есть небольшая проблема с удалением расстояния между прямоугольниками.

 var myConfig = {
            type: 'bar',
            legend: {
                layout: "x4",
                overflow : "page",
                shadow : false,
                align : "left",
                alpha :0.05,
                "adjust-layout": true,
                marker : {
                    type : "circle",
                    size : "7px",
                    "border-color" :"none"
                }
            },
            scaleX: {
                // convert text on scale indices
                labels: ['Automotive', 'Retail', 'Wholesale']
            },
            plot: {
                barWidth:"50%",
                animation: {
                    effect: 'ANIMATION_EXPAND_BOTTOM',
                    method: 'ANIMATION_STRONG_EASE_OUT',
                    sequence: 'ANIMATION_BY_NODE',
                    speed: 275,
                }
            },
            series: [
                {
                    // plot 1 values, linear data
                    values: [23, 20, 27],
                    text: 'Sum of target Premi',
                    backgroundColor: '#fa6383',
                    borderRadius: 5,
                },
                {
                    // plot 2 values, linear data
                    values: [35, 42, 33],
                    text: 'Sum of premi Leads',
                    backgroundColor: '#fb9f40',
                    borderRadius: 5,
                },
                {
                    // plot 2 values, linear data
                    values: [15, 22, 13],
                    text: 'Sum of premi Activity',
                    backgroundColor: '#fdcd55',
                    borderRadius: 5,
                },
                {
                    // plot 2 values, linear data
                    values: [15, 22, 13],
                    text: 'Sum of premi Booking',
                    backgroundColor: '#4bc0c1',
                    borderRadius: 5,
                }
            ]
        };

для моих настроек, как это. есть предложения, так что не может быть места?

У меня есть документация по попытке, но она не работает. https://www.zingchart.com/docs/chart-types/bar


person Adam Projo    schedule 01.07.2020    source источник


Ответы (1)


Я не уверен, что правильно понял вашу проблему, но, возможно, вы можете попробовать использовать barOverlap в конфигурации графика для достижения желаемого результата.

 var myConfig = {
            type: 'bar',
            legend: {
                layout: "x4",
                overflow : "page",
                shadow : false,
                align : "left",
                alpha :0.05,
                "adjust-layout": true,
                marker : {
                    type : "circle",
                    size : "7px",
                    "border-color" :"none"
                }
            },
            scaleX: {
                // convert text on scale indices
                labels: ['Automotive', 'Retail', 'Wholesale']
            },
            plot: {
                barWidth:"50%",
                barsOverlap: '50%',
                animation: {
                    effect: 'ANIMATION_EXPAND_BOTTOM',
                    method: 'ANIMATION_STRONG_EASE_OUT',
                    sequence: 'ANIMATION_BY_NODE',
                    speed: 275,
                }
            },
            series: [
                {
                    // plot 1 values, linear data
                    values: [23, 20, 27],
                    text: 'Sum of target Premi',
                    backgroundColor: '#fa6383',
                    borderRadius: 5,
                },
                {
                    // plot 2 values, linear data
                    values: [35, 42, 33],
                    text: 'Sum of premi Leads',
                    backgroundColor: '#fb9f40',
                    borderRadius: 5,
                },
                {
                    // plot 2 values, linear data
                    values: [15, 22, 13],
                    text: 'Sum of premi Activity',
                    backgroundColor: '#fdcd55',
                    borderRadius: 5,
                },
                {
                    // plot 2 values, linear data
                    values: [15, 22, 13],
                    text: 'Sum of premi Booking',
                    backgroundColor: '#4bc0c1',
                    borderRadius: 5,
                }
            ]
        };

person Andrey Frolov    schedule 07.08.2020