4

是否可以更改标记的线条笔画?我已经知道可以改变它的颜色:

markings: [ { yaxis: { from: 0, to: 0 }, color: "#000"},
            { xaxis: { from: 0, to: 0 }, color: "#000" }],

我已经使用此解决方案使我的轴没有背景网格线: display-x-axis-and-y-axis-lines-with-out-the-grid-lines-using-flot

4

2 回答 2

6

只需添加选项:

        markings: [ { yaxis: { from: 0, to: 0 }, color: "#000"},
                    { xaxis: { from: 0, to: 0 }, color: "#000" }],
        markingsLineWidth: 2.5, //number
于 2012-10-11T18:10:43.570 回答
0

除了markingsLineWidth适用于所有标记的选项外,您还可以定义lineWidth每个标记:

markings: [ { yaxis: { from: 0, to: 0 }, color: "#000", lineWidth: 5},  // speficic value
            { xaxis: { from: 0, to: 0 }, color: "#000" }],
markingsLineWidth: 2.5, // default value

源代码链接:
默认值: 每个标记值:markingsLineWidth: 2
var lineWidth = m.lineWidth || options.grid.markingsLineWidth;

于 2016-10-03T15:58:37.400 回答