gpt4 book ai didi

javascript - FlotCharts 两种颜色的背景

转载 作者:行者123 更新时间:2023-11-28 11:17:03 25 4
gpt4 key购买 nike

使用流程图,我需要将背景分成两种颜色。它不会在中间,它会有轻微的偏移。

据我所知,我在互联网上找不到任何提供此信息的文档。如果有人能指出我正确的方向,那就太好了。如果可能的话,有人可以输入代码来说明如何做到这一点吗?

最佳答案

如果我正确理解你的问题,最简单的方法是使用 grid 标记选项。

例如:

$.plot($("#placeholder"), [ d1 ], {grid: {
markings: [
{xaxis: { from: 0, to: 6 },color: "#C11B17"},
{xaxis: { from: 6, to: 100},color: "#FDD017"}
]}
});

产品:

enter image description here

fiddle here .

关于javascript - FlotCharts 两种颜色的背景,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17200569/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com