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

adding direction: rtl; to body in css messes with center alignment #184

Open
FLasH3r opened this issue Jun 6, 2020 · 3 comments
Open

adding direction: rtl; to body in css messes with center alignment #184

FLasH3r opened this issue Jun 6, 2020 · 3 comments
Labels

Comments

@FLasH3r
Copy link

FLasH3r commented Jun 6, 2020

I've tried it with bar graph

body { direction: rtl; }

image

without body { direction: rtl; }

image

var graph_data = {
            labels: [200,301,404,500],
            datasets: [
                {
                    data: [67,1,0,0]
                    options: {
                        responsive:false
                    }
                }
            ]
        };
var myBarChart = new Chart(graph_ctx, {
            type: 'bar',
            data: graph_data,
            options: {
                legend: {
                    display: false
                },
                title: {
                    text: "bar graph",
                    display:true
                },
                animation: {
                    duration: 2000,
                },
                plugins: {
                    datalabels: {
                        color:'white',
                        display: function(context) {
                            return context.dataset.data[context.dataIndex] !== 0; // or >= 1 or ...
                        },
                        textShadowColor: 'black',
                        textShadowBlur: 2
                    }
                }
            }
@simonbrunel
Copy link
Member

@FLasH3r can you create a codepen that reproduces your issue so it's easier for us to debug?

@simonbrunel
Copy link
Member

I have been able to reproduce this issue but I don't have solution yet on how to fix it.

@besufkadmenji
Copy link

use textAlign: "center", default is start

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

No branches or pull requests

3 participants