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

staked100 is not working as expected when component re-rendered. #105

Open
dhineshdhanapal opened this issue Dec 12, 2023 · 1 comment
Open

Comments

@dhineshdhanapal
Copy link

dhineshdhanapal commented Dec 12, 2023

@y-takey I am using react-chartjs-2 and chartjs-plugin-stacked100 in react single page components.
when I use stacked bar chart, when the component got re-rendered, stacked bars are not as same as with full width on initial render.
image
when the component re-rendered, it is changed as follows.

image

I am using as follows:
ChartJS.register(ChartjsPluginStacked100)
<Bar height="35px"
data= {data}
options={{
indexAxis: 'y',
responsive: false,
maintainAspectRatio: false,
scales: {
x: {
display: false,
grid: {
display: false,
},
stacked: true,
},
y: {
display: false,
title: "yaxis",
grid: {
display: false,
},
stacked: true,
},
},
plugins: {
legend: {
display: false,
},
tooltip: {
enabled: false,
},
stacked100: {
enable: true
},
},
}}
/>

@y-takey
Copy link
Owner

y-takey commented Dec 18, 2023

Hi @dhineshdhanapal , I appreciate your report. To better understand and address the issue, could you please provide a repository that reproduces the problem?

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

No branches or pull requests

2 participants