我不熟悉海图。我试图在不考虑AXIS Y中每个值的情况下绘制图形。
我已经看到一个使用此库的网站,而且确实如此(请参见下图)。如您所见,具有75的太阳辐射率低于具有4.16的电池水平。因此,它没有考虑值的规模。每个都有自己的规模。我怎么能得到这个?
我的应用当前可以自动缩放,我希望它看起来像上面的一样。
我从highcharts中添加了代码:
this.chartOptions = {
lang: {
loading: 'Cargando...',
viewFullscreen:"Ver en pantalla completa",
months: ['Enero', 'Febrero', 'Marzo', 'Abril', 'Mayo', 'Junio', 'Julio', 'Augosto', 'Septiembre', 'Octubre', 'Noviembre', 'Diciembre'],
weekdays: ["Domingo", "Lunes", "Martes", "Miércoles", "Jueves", "Viernes", "Sábado"],
shortMonths: ['Ene', 'Feb', 'Mar', 'Abr', 'May', 'Jun', 'Jul', 'Ago', 'Sep', 'Oct', 'Nov', 'Dic'],
shortWeekdays: undefined,
exportButtonTitle: "Exportar",
printButtonTitle: "Importar",
rangeSelectorFrom: "Desde",
rangeSelectorTo: "Hasta",
rangeSelectorZoom: "Período",
downloadPNG: 'Descargar imagen PNG',
downloadJPEG: 'Descargar imagen JPEG',
downloadPDF: 'Descargar imagen PDF',
downloadSVG: 'Descargar imagen SVG',
printChart: 'Imprimir',
resetZoom: 'Reiniciar zoom',
resetZoomTitle: 'Reiniciar zoom',
thousandsSep: ",",
decimalPoint: '.'
},
global: {
useUTC: true
},
chart: {
type: "line",
// zoomType: 'x'
},
title: {
text: ""
},
legend: {
enabled: true
},
exporting: {
//deshabilitando el boton de print
enabled: true
},
time: {
useUTC: false
},
tooltip: {
formatter: function () {
return new Date(this.x).toLocaleString('es-ES') + '<br><b>Valor: </b>' +
'<span style="color:' + this.series.color + '">' +
this.series.name + '</span>: <b>' + Highcharts.numberFormat((this.y), 2, '.') + ' </b><br/>'
// return s + Highcharts.numberFormat((this.y), 1, '.') + ' </b><br/>'
},
},
credits: {
enabled: false
},
xAxis: {
type:"datetime",
},
yAxis: {
title:{
text:""
}
},
responsive: {
rules: [{
condition: {
maxWidth: 500
},
chartOptions: {
chart: {
height: 300
},
subtitle: {
text: null
},
navigator: {
enabled: false
}
}
}]
},
series: this.multi,
};
答案 0 :(得分:0)
为每个系列创建一个单独的y轴,每个系列都有自己的比例尺。
series: [{
...
}, {
...,
yAxis: 1
}, {
...,
yAxis: 2
}],
yAxis: [{...}, {...}, {...}]
实时演示: http://jsfiddle.net/BlackLabel/2fd3wsLm/
API参考: https://api.highcharts.com/highcharts/series.line.yAxis