Blazor Chart Cursor Offset
Posted: Wed Nov 20, 2024 10:39 pm
Hello,
I have a chart being in rendered into the following canvas.
I am trying to get my chart to extended to the end of my window without hard coding in a width.
I currently have width set to 100% as follows.
An issue I am having though is the further I move my mouse cursor to the right, the more the chart thinks it is offset. I believe what is happening is the chart image is rendering into the canvas, and then the canvas is stretching to fill the screen. As a result it looks the chart doesn't recognize the correct location of the cursor. Is there a work around for this?
Thanks
I have a chart being in rendered into the following canvas.
Code: Select all
<tally-chart>
<canvas id="canvas1" height="500" style="border: 0px solid #808080;" oncl />
</tally-chart>
I currently have width set to 100% as follows.
Code: Select all
tally-chart {
display: flex;
width: 100%;
padding: 0;
border: none;
margin: 0;
height: 500px
}
tally-chart > canvas {
display: flex;
width: inherit;
height: inherit
}
Thanks