Closed Schrall closed 4 years ago
Thanks for contacting us.
Have you set the Responsive
option to true
in your config (like in the example you liked)? If so, the behaviour is expected (read this). I think it's suboptimal behaviour but for now you'll have to add a container div around it with a fixed height if you want to keep responsivness while restricting to a certain size. Otherwise just set Responsive
to false
and the fixed size should apply.
Thank you.
Describe the bug
<ChartJsBarChart @ref="_barChartJs" Config="@_config" Width="400" Height="200" />
should render a Chart with a Canvas Size 400x200px. Instead i get a Canvas with following Measurements:Which Blazor project type is your bug related to?
Which charts does this bug apply to?
To Reproduce
Steps to reproduce the behavior:
https://raw.githubusercontent.com/mariusmuntean/ChartJs.Blazor/master/samples/Shared/ChartJs.Blazor.Sample.Shared/Components/BarCharts/TimeBarChartComponent.razor
Expected behavior
Get a Chart with a Size 400x200px