Highcharts。如何添加自定义滚动条?

时间:2014-02-12 06:40:47

标签: javascript jquery highcharts

image with example

图像顶部是带导航器的嵌入式滚动条,但我需要创建带有自定义元素的滚动条 - 图像底部的滚动条。

我需要滚动并用它调整图形大小。

我该怎么做?

UPD:加价

<div class="chart-box">

    <div id="chart-pane">
        <div id="chart-pays">
            <div class="chart-canvas">
                <!-- place for graph -->
            </div>
        </div>
    </div>


    <!-- my custom scrollbar -->
    <div id="chart-scrollbar">
        <div class="handler ui-draggable ui-resizable">
            <div class="ui-resizable-handle ui-resizable-e" style="z-index: 90;"></div>
            <div class="ui-resizable-handle ui-resizable-w" style="z-index: 90;"></div>
        </div>
    </div>

</div>

1 个答案:

答案 0 :(得分:1)

您可以自定义高图表滚动条

$('#container').highcharts('StockChart', {
 scrollbar: {
                barBackgroundColor: 'gray',
                barBorderRadius: 7,
                barBorderWidth: 0,
                buttonBackgroundColor: 'gray',
                buttonBorderWidth: 0,
                buttonBorderRadius: 7,
                trackBackgroundColor: 'none',
                trackBorderWidth: 1,
                trackBorderRadius: 8,
                trackBorderColor: '#CCC'
            },
}

refer here