Javascript 区域中区域的负颜色?

Javascript 区域中区域的负颜色?,javascript,highcharts,Javascript,Highcharts,是否有设置区域负片部分颜色的方法 我的意图是实现这样的目标。不要注意背景上的打印条带 您可以减少系列fillOpacity值,并使用Highcharts.svgrender在系列下添加图层,这将影响颜色: chart: { events: { load: function() { var series = this.series[0].area, plotLeft = this.plotLeft;

是否有设置区域负片部分颜色的方法

我的意图是实现这样的目标。不要注意背景上的打印条带


您可以减少系列
fillOpacity
值,并使用
Highcharts.svgrender
在系列下添加图层,这将影响颜色:

chart: {
    events: {
        load: function() {
            var series = this.series[0].area,
                plotLeft = this.plotLeft;

            this.renderer.path().attr({
                translateX: plotLeft,
                translateY: this.plotTop,
                d: series.d,
                fill: 'rgba(255, 0, 0, 0.6)',
                zIndex: 0
            }).add();

            this.renderer.rect(
                plotLeft,
                this.yAxis[0].toPixels(0),
                this.plotSizeX,
                this.plotTop + this.plotSizeY - this.yAxis[0].toPixels(0)

            ).attr({
                fill: '#FFF',
                zIndex: 0
            }).add()
        }
    }
}
现场演示:


API:

这是一个可接受的解决方案吗:?不是真的,您只是更改了分区轴。我需要在xAxis上定义我的区域。没有为区域的负部分着色的内置方法。你最好的办法是找出什么是正片,什么是负片,什么是颜色。不幸的是,这也不是一个解决办法。正片和负片的颜色太远,无法实现与图像相似的效果。顺便说一句,图片来自my Co.上的现有应用程序。查看图表可以帮助您了解它是如何完成的吗?嗨,Merak Marey,默认情况下不支持您想要实现的效果,需要一些自定义和实验解决方案。目前我还没有想到其他解决办法。我能看到图表,但我不知道它是否有用。
chart: {
    events: {
        load: function() {
            var series = this.series[0].area,
                plotLeft = this.plotLeft;

            this.renderer.path().attr({
                translateX: plotLeft,
                translateY: this.plotTop,
                d: series.d,
                fill: 'rgba(255, 0, 0, 0.6)',
                zIndex: 0
            }).add();

            this.renderer.rect(
                plotLeft,
                this.yAxis[0].toPixels(0),
                this.plotSizeX,
                this.plotTop + this.plotSizeY - this.yAxis[0].toPixels(0)

            ).attr({
                fill: '#FFF',
                zIndex: 0
            }).add()
        }
    }
}