高亮显示悬停效果的一栏

[英]Highcharts Areaspline - Highlight a column on hover effect


Stuck with the problem of highlighting column of area spline. Didn't find any solutions via Chartjs, and Highcharts didn't help me either. I need to highlight x-axis column, but till the chart curve. In my code, I'm using Crosshair, but it's not exactly what I need.

解决了区域样条列突出的问题。没有通过Chartjs找到任何解决方案,Highcharts也没有帮助我。我需要突出x轴列,直到图表曲线。在我的代码中,我使用了Crosshair,但它并不是我所需要的。

xAxis: {
        allowDecimals:false,
        min: 1,
        max: 12,
        categories: ['', 'JAN', 'FEB', 'MAR', 'APR', 'MAY', 'JUN', 'JUL', 'AUG', 'SEP', 'OCT', 'NOV', 'DEC', ''],
        labels: {
            y: -10,
            style: {
                color: '#66717c',
                fontSize: '13px'
            }
        },
        tickWidth: 0,
        lineColor: "#fff",
        crosshair: {
            width: 60,
            color: 'rgba(73,168,222,0.5)',
            zIndex: 5
        }
    },
    yAxis: {
        title: {
            text: ''
        },
        gridLineWidth: '0',
        visible: false
    }

My result:

我的结果:

Img01

And what I need:

和我所需要的东西:

Img02

Does anybody know how to achieve this?

有人知道怎么做到吗?

1 个解决方案

#1


4  

If you will add another series that will be stacked on top of the real series with percent stacking, then you could use that area fill is partially transparent and place crosshair under series. Fake series should be used as something to cover part of the crosshair that you want to hide.

如果您将添加另一个系列,将堆叠在真实系列的顶部和百分比堆叠,那么您可以使用区域填充是部分透明的,并放置交叉空气在系列。假系列应该被用来覆盖你想要隐藏的部分十字准线。

Example: http://jsfiddle.net/aft9esqr/

例如:http://jsfiddle.net/aft9esqr/

智能推荐

注意!

本站翻译的文章,版权归属于本站,未经许可禁止转摘,转摘请注明本文地址:http://www.silva-art.net/blog/2016/04/13/3574e18c947c65fa0a150ffd07b53a1b.html



 
© 2014-2019 ITdaan.com 粤ICP备14056181号  

赞助商广告