highcharts 中是否有任何属性可以用来删除使用 JavaScript 出现在该柱形图中的图表上下文菜单(看起来像右侧的汉堡菜单) ?
这个选项默认出现在 highchart 中吗?我还有一个折线图,但默认情况下没有图表上下文菜单。另外,如果我想向该折线图添加图表上下文菜单,我该怎么做?
Highcharts.chart('container', {
chart: {
type: 'column',
events: {
load: function() {
var series = this.series[0];
setInterval(function() {
newValue = Math.random() * 100;
series.update({
data: [newValue],
}, true)
}, 1000);
}
}
},
title: {
text: 'Monthly Average Rainfall'
},
subtitle: {
text: 'Source: WorldClimate.com'
},
xAxis: {
categories: [
'Jan'
],
crosshair: true
},
yAxis: {
min: 0,
title: {
text: 'Rainfall (mm)'
}
},
tooltip: {
headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
pointFormat: …Run Code Online (Sandbox Code Playgroud)我一直在开发一个在线应用程序,允许用户点击并操作 mp3 文件,并且我试图将本地文件从我的计算机加载到 Wavesurfer 对象中,但我在 chrome 中不断收到此错误:
“从源“null”访问“file:///local/file/path/to/audio/files/some.mp3”处的 XMLHttpRequest 已被 CORS 策略阻止:跨源请求仅支持协议方案:http 、数据、chrome、chrome 扩展、https。”
我尝试将 HTML 和 mp3 文件放在多台计算机上的多个不同文件夹中,但似乎没有任何效果。这是我的代码:
<body>
<script src="https://cdnjs.cloudflare.com/ajax/libs/wavesurfer.js/1.2.3/wavesurfer.min.js"></script>
<div id="waveform"></div>
<script>
var wavesurfer = WaveSurfer.create({
container: '#waveform',
waveColor: 'darkorange',
progressColor: 'blue',
height: 64,
backend: 'MediaElement'
});
//setRequestHeader('Origin', document.domain);
//wavesurfer.load("http://ia902606.us.archive.org/35/items/shortpoetry_047_librivox/song_cjrg_teasdale_64kb.mp3");
var song = "clippedJaco.mp3";
wavesurfer.load(song);
wavesurfer.on('ready', function () {wavesurfer.play();});
</script>
</body>
Run Code Online (Sandbox Code Playgroud)
添加“MediaElement”后端时,会加载 mp3,但不会生成波形。非常感谢任何帮助,谢谢!