相关疑难解决方法(0)

jqPlot - 如何更改canvasOverlay的不透明度或z-index?

我想在我的图表上根据y轴值显示3个颜色区域,据我所知,我无法通过不同的颜色控制背景颜色.

我的想法是用canvasOverlay绘制3条水平线 - 这是有效的.问题是我想把这条线放在我的图形曲线后面,现在它在前面看到它覆盖了我的点线.

我可以更改z-index的属性或不透明度吗?

也许其他一些想法?

  $.jqplot( 'ChartDIV', [data],
        {
            series: [{ showMarker: true}],
            highlighter: {
                sizeAdjust: 10,
                show: true,
                tooltipLocation: 'n',
                useAxesFormatters: true
            },

            tickOptions: {
                formatString: '%d'
            },
            canvasOverlay: {
                show: true,
                objects: [ 
                            {
                                horizontalLine: 
                                {      
                                    name: 'low', 
                                    y: 1.0,
                                    lineWidth: 100,
                                    color: 'rgb(255, 0, 0)',
                                    shadow: false 
                                }
                            },      
                            {
                                horizontalLine:
                                { 
                                    name: 'medium',
                                    y: 2.0,
                                    lineWidth: 100, 
                                    color: 'rgb(250, 250, 0)', 
                                    shadow: true 
                                }
                            },
                            {
                                 horizontalLine:
                                {
                                    name: 'high',
                                    y: 3.0,
                                    lineWidth: 100,
                                    color: …
Run Code Online (Sandbox Code Playgroud)

jqplot

5
推荐指数
1
解决办法
1万
查看次数

标签 统计

jqplot ×1