Ero sivun ”Widget:JwObsCharts” versioiden välillä
Järvi-meriwikistä
Rivi 861: | Rivi 861: | ||
//memo.options.trendlines[0] = { labelInLegend: i18n['trendline'][memo.lang], tooltip: false, color: colors['trend'], lineWidth: 2, opacity: 0.5, type: 'linear', visibleInLegend: memo.trendType!='moving' }; | //memo.options.trendlines[0] = { labelInLegend: i18n['trendline'][memo.lang], tooltip: false, color: colors['trend'], lineWidth: 2, opacity: 0.5, type: 'linear', visibleInLegend: memo.trendType!='moving' }; | ||
− | console.log( memo ); | + | //console.log( memo ); |
for (var o in memo.obsesA) { | for (var o in memo.obsesA) { | ||
+ | |||
+ | memo.obsesA[o].popup = memo.obsesA[o].popup.replace( /([^)]*)/gi, function( x ) { | ||
+ | dA = c.split('.'); | ||
+ | return dA[2]; | ||
+ | }); | ||
memo.dataA.push( [ memo.obsesA[o].obsdatetime, memo.obsesA[o].value, memo.obsesA[o].data.low/100, memo.obsesA[o].data.high/100, memo.obsesA[o].style, null, memo.obsesA[o].popup ] ); | memo.dataA.push( [ memo.obsesA[o].obsdatetime, memo.obsesA[o].value, memo.obsesA[o].data.low/100, memo.obsesA[o].data.high/100, memo.obsesA[o].style, null, memo.obsesA[o].popup ] ); | ||
} | } | ||
Rivi 873: | Rivi 878: | ||
} | } | ||
+ | memo.options.seriesType = 'line'; | ||
memo.options.series[0] = { type: 'line', pointSize: 3, color: '#3366cc' }; | memo.options.series[0] = { type: 'line', pointSize: 3, color: '#3366cc' }; | ||
memo.options.curveType = 'function'; | memo.options.curveType = 'function'; | ||
memo.options.intervals = { 'style': 'area' }; | memo.options.intervals = { 'style': 'area' }; | ||
+ | |||
memo.options.vAxis.viewWindow.min = 80; | memo.options.vAxis.viewWindow.min = 80; | ||
− | + | memo.options.vAxis.viewWindow.max = 82; | |
− | + | ||
− | memo.options. | ||
memo.chart = new google.visualization.LineChart( memo.chartEl[0] ); // document.getElementById(memo.id) | memo.chart = new google.visualization.LineChart( memo.chartEl[0] ); // document.getElementById(memo.id) |