Demo a little off
Opened this issue · 9 comments
Oh, let me check
So, I think this is an issue with Chart.js. I opened a bug on their project. All the other graphs are ok except for the line graph.
@erossini I guess your last changes within Chart.razor was about this problem? However it led only to bigger problems.
I use firefox and before when running demo I had big gap under the chart. Now, after this change I have chart overlapping the code, but in my own app the chart resizes on entire screen.
Locally I can remove those changes, but I would say until there is really rock solid solution to remove those changes from your code as well (i.e. officially so to speak).
I'm not sure this problem is something related to Chart.razor
because if you open the HTML, you can see the height
of the chart-container
is rewritten for the canvas
by Chart.js but only when you ask for a line chart.
I don't know if you have the same problem or not.
I am using scatter plot in my app.
As for my app I found the culprit -- in your last changes you added css class with display: inline-block
. This is causing chart to go over entire screen.
I would say this and setting width to 100% would be better removed. Let user decide via Class
property, it is fully customizable after all.
I removed the display
in the CSS
Yes, the demo looks off, but I don't know why (so far). My point was that fix should of course improve the demo, but behave predictably in other apps as well.
PS: I added few new graphs