我試圖讓圖表中的區域在值超過特定閾值時改變顏色。這是我的圖表:Highchart 資源有一個如何執行此操作的示例:https://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/master/samples/highcharts/series/color-zones-simple/然而,我的問題是,當您的 Highchart 從文本文件導入數據時,我無法在任何地方找到如何執行此操作的示例。我對圖表的樣式設置得相當嚴格,所以這是我的 highchart 代碼片段:$(function () { // Load the fontsHighcharts.createElement('link', { href: 'http://fonts.googleapis.com/css?family=Signika:400,700', rel: 'stylesheet', type: 'text/css'}, null, document.getElementsByTagName('head')[0]);// Add the background image to the containerHighcharts.wrap(Highcharts.Chart.prototype, 'getContainer', function (proceed) { proceed.call(this); this.container.style.background =null;});Highcharts.theme = { colors: ['#5B8256'], chart: { backgroundColor: null, style: { fontFamily: "Arial, Helvetica, sans-serif"}, plotBorderColor: '#606063'}, title: { style: { color: '#eeeeee', fontSize: '16px', fontWeight: ''}}, subtitle: { style: { color: '#eeeeee'}}, tooltip: { backgroundColor: 'rgba(0, 0, 0, 0.85)', style: {color: '#F0F0F0'}, borderWidth: 0}, legend: { itemStyle: { fontWeight: 'bold', fontSize: '13px'}}, xAxis: { labels: { style: { color: '#eeeeee'}}}, yAxis: { labels: { style: { color: '#eeeeee'}}}, plotOptions: { series: {shadow: true}, marker: {lineColor: '#333'}, candlestick: {lineColor: '#404048'}, map: {shadow: false}}, navigator: { xAxis: {gridLineColor: '#D0D0D8'}}, rangeSelector: { buttonTheme: {fill: '#eeeeee',stroke: '#C0C0C8','stroke-width': 1, states: { select: {fill: '#D0D0D8'}}}}, scrollbar: {trackBorderColor: '#eeeeee'}, background2: null};任何為我指明正確方向的幫助將不勝感激。
用于導入文本文件的 Highcharts 區域功能
偶然的你
2023-10-20 09:19:13