<view>
<view id="echart1" style="width: 98%;height:800rpx;margin:0 auto;margin-top: 32rpx;"></view>
</view>
</template>
<script>
import $ from '../../common/js/jquery-3.4.1.min.js'
import * as Highcharts from "highcharts";
import * as Exporting from "highcharts/modules/exporting";
export default{
name:"landscapeCompare",
data(){
return{
}
},
onLoad() {
},
mounted() {
console.log(456)
this.getHighcharts();
},
methods:{
getHighcharts(){
var chart = Highcharts.chart('echart1', {
credits: {
enabled: false //去掉版权信息
},
chart: {
type: 'spline'
},
title: {
text: '湿度变化曲线图',
x:-100
},
// subtitle: {
// text: '(℃)',
// x: -155
// },
xAxis: {
type: "datetime",
title: false,
labels: {
enabled: false
}
// categories: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月']
},
// color:["#33cfff","#2bd6ad"],
yAxis: {
title: {
text: false
},
labels: {
formatter: function () {
return this.value + '°';
}
}
},
tooltip: {
crosshairs: true,
shared: true
},
plotOptions: {
spline: {
marker: {
enabled: false
}
}
},
series: [
{
name: '设备#1',
data: [7.0, 16.9, 29.5, 14.5, 18.2, 18.3, 13.9, 29.6]
},
{
name: '设备#2',
data: [9.0, 2.9, 7.5, 4.5, 8.2, 30.3, 19.9, 5.6]
}
]
});
}
}
}
</script>
<style scoped>
</style>
https://blog.csdn.net/qq_36736346/article/details/85724643
劝后来者,直接用webview做,renderjs好坑啦
解决了吗?