Я пытался разместить линейную диаграмму не с начала оси.И указание конкретной позиции по дате.График отображается, но очень странно.Это не масштабируется.
Highcharts.stockChart('container', {
xAxis: {
min: Date.UTC(2010, 0, 1),
max: Date.UTC(2010, 1, 1),
type: 'datetime',
pointStart: Date.UTC(2009, 0, 1),
tickInterval: 3600 * 1000,
startOnTick: false
},
series: [{
name: 'test',
data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4],
pointStart: Date.UTC(2010, 0, 5),
offset: 100,
tickInterval: 3600 * 1000,
pointInterval: 3600 * 1000
}]
});
<script src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<!--<script src="https://code.highcharts.com/highcharts.js"></script>-->
<link rel="stylesheet" href="https://code.highcharts.com/css/highcharts.css">
<script src="https://code.highcharts.com/stock/js/highstock.js"></script>
<script src="https://momentjs.com/downloads/moment.js"></script>
<script src="https://momentjs.com/downloads/moment-timezone-with-data.min.js"></script>
<div id="container" style="width:100%; height:600px;"></div>
Как это исправить?
[JS Fiddle][1]
[1]: https://jsfiddle.net/6orqa0ym/