내 브라우저에서 작동하지 않는 동안 jsfiddle에 내 차트를 완벽하게 표시 할 수 있습니다. jquery를 가져 오려고했지만 작동하지 않습니다. 누구든지 제발 도와 줄 수 있습니까?
여기 내 코드를 찾을 수 있습니다.
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
대단히 감사합니다.
혼자 작동하는 바이올린을 얻으려면 다음을 수행해야합니다.
또한 jquery URL에는 올바른 URL이 있어야합니다. <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
여기에 최종 코드가 있습니다. 브라우저에서 열린 HTML 파일로 저장할 수 있습니다.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
</head>
<body>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="https://code.highcharts.com/4.1.9/highcharts.js"></script>
<script src="https://code.highcharts.com/4.1.9/highcharts-more.js"></script>
<script src="https://code.highcharts.com/4.1.9/modules/solid-gauge.js"></script>
<div style="width: 600px; height: 400px; margin: 0 auto">
<div
id="container-speed"
style="width: 300px; height: 200px; float: left"
></div>
<div
id="container-rpm"
style="width: 300px; height: 200px; float: left"
></div>
</div>
<script>
$(function() {
var gaugeOptions = {
chart: {
type: 'solidgauge'
},
title: null,
pane: {
center: ['50%', '85%'],
size: '140%',
startAngle: -90,
endAngle: 90,
background: {
backgroundColor:
(Highcharts.theme && Highcharts.theme.background2) || '#EEE',
innerRadius: '60%',
outerRadius: '100%',
shape: 'arc'
}
},
tooltip: {
enabled: false
},
// the value axis
yAxis: {
stops: [
[0.1, '#55BF3B'], // green
[0.5, '#DDDF0D'], // yellow
[0.9, '#DF5353'] // red
],
lineWidth: 0,
minorTickInterval: null,
tickPixelInterval: 400,
tickWidth: 0,
title: {
y: -70
},
labels: {
y: 16
}
},
plotOptions: {
solidgauge: {
dataLabels: {
y: 5,
borderWidth: 0,
useHTML: true
}
}
}
}
// The speed gauge
$('#container-speed').highcharts(
Highcharts.merge(gaugeOptions, {
yAxis: {
min: 10000,
max: 20000,
mean: 15000,
title: {
text: 'Prix par rapport au marché'
}
},
credits: {
enabled: false
},
series: [
{
name: 'Prix par rapport au marché',
data: [17000]
},
{
name: 'Foo',
type: 'gauge',
data: [17000]
}
]
})
)
// Bring life to the dials
})
</script>
</body>
</html>
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다