ngx 图表:折线图定义线宽
ngx charts: Line chart define line width
我正在为一个项目使用 ngxChart,一切都很好,但我发现线宽很细,我不知道如何让它变大。
有什么帮助吗?
将以下规则添加到全局 styles.scss
文件中:
/* Make lines in line chart thick, with rounded ends */
g.line-chart > g:last-of-type > g:nth-child(n) g.line-series > path {
stroke-width: 10;
stroke-linecap: round;
}
g:nth-child(n)
中的 n
可以替换为引用您要修改的行号的数字(例如,第一行的 0
)或其他内容就像每第二行 2n
。
显然 10
的宽度可以更改为任意宽度。
我正在为一个项目使用 ngxChart,一切都很好,但我发现线宽很细,我不知道如何让它变大。
有什么帮助吗?
将以下规则添加到全局 styles.scss
文件中:
/* Make lines in line chart thick, with rounded ends */
g.line-chart > g:last-of-type > g:nth-child(n) g.line-series > path {
stroke-width: 10;
stroke-linecap: round;
}
g:nth-child(n)
中的 n
可以替换为引用您要修改的行号的数字(例如,第一行的 0
)或其他内容就像每第二行 2n
。
显然 10
的宽度可以更改为任意宽度。