Ero sivun ”Widget:JwObsCharts” versioiden välillä
Järvi-meriwikistä
Rivi 841: | Rivi 841: | ||
function addDataToTrendWithHighLowChart (memo) { | function addDataToTrendWithHighLowChart (memo) { | ||
− | console.log( 'high low chart'); | + | //console.log( 'high low chart'); |
// do axis min and max | // do axis min and max | ||
Rivi 852: | Rivi 852: | ||
memo.data.addColumn( 'number', memo.obsMinYear + '-' + memo.obsMaxYear ); | memo.data.addColumn( 'number', memo.obsMinYear + '-' + memo.obsMaxYear ); | ||
+ | memo.data.addColumn( {id:'i0', type:'number', role:'interval'} ); | ||
+ | memo.data.addColumn( {id:'i1', type:'number', role:'interval'} ); | ||
memo.data.addColumn( {'type': 'string', 'role': 'style' } ); | memo.data.addColumn( {'type': 'string', 'role': 'style' } ); | ||
memo.data.addColumn( { type: 'string', role: 'annotation' } ); | memo.data.addColumn( { type: 'string', role: 'annotation' } ); | ||
Rivi 860: | Rivi 862: | ||
for (var o in memo.obsesA) { | for (var o in memo.obsesA) { | ||
− | memo.dataA.push( [ memo.obsesA[o].obsdatetime, memo.obsesA[o].value, memo.obsesA[o].style, null, memo.obsesA[o].popup ] ); | + | memo.dataA.push( [ memo.obsesA[o].obsdatetime, memo.obsesA[o].value, memo.obsesA[o].low, memo.obsesA[o].high, memo.obsesA[o].style, null, memo.obsesA[o].popup ] ); |
} | } | ||
Rivi 869: | Rivi 871: | ||
} | } | ||
− | memo.options.series[0] = {type: 'line', pointSize: 6, color: '#3366cc' }; | + | memo.options.series[0] = { type: 'line', pointSize: 6, color: '#3366cc' }; |
− | console.log(memo); | + | memo.options.intervals = { 'style': 'line' }; |
+ | //console.log(memo); | ||
drawChart(memo); | drawChart(memo); | ||