最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Flot Grid with Customised Borders - Stack Overflow

programmeradmin1浏览0评论

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 e 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?

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 e 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?

Share Improve this question edited Jul 10, 2013 at 14:00 mert asked Jul 10, 2013 at 12:44 mertmert 2,0022 gold badges25 silver badges43 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 6

Which version of flot are you using? The borderWidth property did not acmodate 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 ma after the borderWidth values. Should be "left: 1 }, borderColor..."

发布评论

评论列表(0)

  1. 暂无评论