Flot Grid with Customised Borders

若如初见. 提交于 2019-12-13 14:08:27

问题


Flot enables us customise grid borders. This is documented here with the following:

grid: {
    borderWidth: number or object with "top", "right", "bottom" and "left" properties with different widths
    borderColor: color or null or object with "top", "right", "bottom" and "left" properties with different colors
}

However, I couldn't manage to come up with a successfully working example. To create a custom grid with top and left border with white color I tried the following, but it didn't work:

grid: {
    borderWidth: {top: 1, right: 0, bottom: 0, left: 1},
    borderColor: {top: "#FFF", left: "#FFF"}
}

Can anyone provide a working example?


回答1:


Which version of flot are you using? The borderWidth property did not accommodate an object as the value until version 0.8. Make sure you are using the latest version (0.8.1) and give it another shot. The only other thing I notice is the missing comma after the borderWidth values. Should be "left: 1 }, borderColor..."



来源:https://stackoverflow.com/questions/17570992/flot-grid-with-customised-borders

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!