英文:
Chart.js Plot Diagonal lines on top right and limit the lines going out of the chart
问题
我正在尝试绘制两点之间的对角线,如下图所示,但是线条超出了图表区域的底部,顶部的区域为空。
如何使线条不超出 x 轴,并计算填充顶部区域的方法?
英文:
I am trying to plot the diagonal lines between two points as shown in the below image, but the lines are going beyond the chart area in the bottom and top end is empty.
CodeSandBox here
https://codesandbox.io/s/nameless-dawn-nhcvjq?file=/App.tsx
How to make the lines not go beyond the x-axis, also the calculations to fill the top end area?
答案1
得分: 0
好的,我会为你翻译以下内容:
好的,我自己解决了,现在新的图表在两个 x 轴点之间有一条水平线,如下所示。
代码沙盒:https://codesandbox.io/s/nameless-dawn-nhcvjq?file=/App.tsx
英文:
Okay I resolved it by myself,Now the new graph with the horizontal line between two x axis point looks like below.
Code sandbox: https://codesandbox.io/s/nameless-dawn-nhcvjq?file=/App.tsx
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论