0

我的要求是当我们将鼠标悬停在一个图表上时,将高图表中的其他柱状条形图变为暗色。我在社区上找了这个,但没有找到具体的答案。我的代码如下:

                        <script src="http://code.highcharts.com/modules/exporting.js"></script>

                        <apex:includeScript value="{!URLFOR($Resource.ios, 'jquery-1.9.1.js')}"/>

                        <script>
                            var lowerIndex;
                            var upperIndex;
                            if({!maxBarVisible}==0)
                            {
                                lowerIndex = 0;
                                upperIndex = 0;
                            }
                            else
                            {
                                lowerIndex = {!maxBarVisible} - ({!maxBarVisible}-1);
                                upperIndex = {!maxBarVisible};
                            }
                            $(function () {
                                var chart;
                                $(document).ready(function() {
                                    chart = new Highcharts.Chart({
                                        chart: {
                                            renderTo: 'container',
                                            type: 'column',
                                            marginRight: 50,
                                            marginBottom: 30
                                        },
                                        title: {
                                                text:''
                                          },  
                                        credits: {
                                            enabled: false
                                          },
                                        legend: {
                                            enabled: false
                                        },
                                        scrollbar:{
                                          enabled:{!showSlider}
                                        },

                                        xAxis: {
                                          min:lowerIndex,
                                          max:upperIndex,
                                            categories: [{!x_axisMonths}]
                                        },
                                        yAxis: {
                                            min: 0,
                                            title: {
                                                text: 'MRR($)'
                                            }
                                        },
                                        colors: [
                                           'rgb(24, 150, 212)', 
                                           'rgb(116, 187, 59)', 

                                        ],
                                        tooltip: {
                                            headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
                                            pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' +
                                                '<td style="padding:0"><b>{point.y:.1f} mm</b></td></tr>',
                                            footerFormat: '</table>',
                                            shared: true,
                                            useHTML: true,
                                           tip: 'bottomLeft'

                                        },
                                        series: [{!y_axisData}]
                                    });
                                });

                            });
                        </script> 


有什么建议么?

4

0 回答 0