Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Label overlapping with stacked bar chart #32

Closed
isildur78 opened this issue Feb 14, 2018 · 1 comment
Closed

Label overlapping with stacked bar chart #32

isildur78 opened this issue Feb 14, 2018 · 1 comment

Comments

@isildur78
Copy link

Hi, i've got a chart, with value labels placed inside the bar.
There is an overlapping between the labels and the chart itself.
Anyone have any idea why this would be happening?
Thanks in advance!

options: {
    legend: {
        display: false
    },
    layout: {
        padding: {
          top: 20
        }
    },
    showLabelsOnBars:true,
    barLabelFontColor:"gray",
    animation: {
        duration: 0
    },
    scales: {
        yAxes: [{
            stacked: true,
            display: false,
            ticks: {
                beginAtZero:true                                     
            }
        }],
        xAxes: [{
            stacked: true,
            id:"ejeX",
            ticks: {
                beginAtZero:true,
                fontSize: 30
            }
        }]

    },
    plugins: {
        datalabels: {
            color: 'black',
            font: {
                size: 24
            },
            formatter: function(value, context) {
                return Number(value).toLocaleString('es-ES');
            },
            display: true
        }
    }
}

image1

@simonbrunel
Copy link
Member

Duplicates #29, fixed in 036ddd6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants