Apexcharts.js: PlotOptions total not showing

Created on 22 May 2019  路  1Comment  路  Source: apexcharts/apexcharts.js

Hello, Greetings. I'm new to Apex charts and have been able to do most of my tasks with the documentation you have provided. Thank you very much !! However, I have an issue with the total not showing up in the donut chart. I assumed that if I set the total - show to "true", the total will be shown in the middle of the chart. I use these options for creating the chart. I get the values from server as json then update the chart using updateoption. Please advise me as to why the total is not showing up.
var donutoptions = {
chart: {
width: '100%',
height: '100%',
type: 'donut',
id: '',

},
plotOptions: {
    pie: {
            donut: {

                total: {
                    show: true,
                    label: 'Total',
                    color: '#373d3f',
                }
            }

    }
},
title: {
    text: '',
    align: 'center',
    margin: 15,
    offsetX: 0,
    offsetY: 0,
    floating: false,
    style: {
        fontSize: '12px',
        color: 'grey'
    }
},

labels: [""],

dataLabels: {
    enabled: false
},

series: [0],
legend:
{
    offsetY: -10,
    float:true,
    position: 'bottom',
    style: {
        fontSize: '10px'

    }

},

responsive: [{
    breakpoint: 250,
    options: {
        chart: {
            width: 200
        },
        legend: {
            position: 'right'
        }
    }
}]

};

Most helpful comment

The total should be given within labels.
plotOptions: {
pie: {
donut: {

            labels: {
                show: true,
                name: {
                    show: false
                },
                value: {
                    offsetY: -1,
                    show: true
                },
                total: {
                    show: true
                }
                }
            }

    }
},

I'm closing this issue now.

>All comments

The total should be given within labels.
plotOptions: {
pie: {
donut: {

            labels: {
                show: true,
                name: {
                    show: false
                },
                value: {
                    offsetY: -1,
                    show: true
                },
                total: {
                    show: true
                }
                }
            }

    }
},

I'm closing this issue now.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

piyushSinghalDemo picture piyushSinghalDemo  路  3Comments

frlinw picture frlinw  路  3Comments

ismaildervisoglu picture ismaildervisoglu  路  3Comments

drew-dulgar picture drew-dulgar  路  3Comments

jeroenpol picture jeroenpol  路  3Comments