Ero sivun ”Widget:XJwCharts” versioiden välillä
Järvi-meriwikistä
Rivi 63: | Rivi 63: | ||
}); | }); | ||
− | + | function obsesReady( memo ) { | |
+ | |||
+ | // margin settings | ||
+ | memo.margins = { top: 0, right: 25, bottom: 60, left: 60 }; | ||
+ | |||
+ | if ( typeof i18n[ memo.obscode ].direction != 'undefined' ) { memo.vaxisdir = i18n[ memo.obscode ].direction; } else { memo.vaxisdir = 1; } | ||
+ | |||
+ | // defaults for all charts | ||
+ | memo.options = { | ||
+ | title: "", //i18n[memo.obscode]['title'][memo.lang], | ||
+ | //titleTextStyle: { fontSize: 14 }, | ||
+ | backgroundColor: 'transparent', | ||
+ | chartArea: { top: memo.margins.top, left: memo.margins.left, width: (memo.container.width() - memo.margins.left - memo.margins.right), height: (memo.container.height() - memo.margins.top - memo.margins.bottom), backgroundColor: { fill: '#daf0fa', stroke: '#fff', strokeWidth: 6 }}, | ||
+ | legend: { position: 'bottom' }, | ||
+ | crosshair: { trigger: 'both' }, | ||
+ | tooltip: { isHtml: true }, | ||
+ | seriesType: 'scatter', | ||
+ | interpolateNulls: true, | ||
+ | |||
+ | vAxis: { | ||
+ | title: i18n[memo.obscode]['axisTitleV'][memo.lang], | ||
+ | titleTextStyle: { bold: true }, | ||
+ | slantedText: false, | ||
+ | maxAlternation: 1, | ||
+ | direction: memo.vaxisdir, | ||
+ | gridlines: { color: '#fff' }, | ||
+ | minorGridlines: { count: 0 }, | ||
+ | viewWindow: { } | ||
+ | }, | ||
+ | hAxis: { | ||
+ | title: '', | ||
+ | slantedText: false, | ||
+ | maxAlternation: 1, | ||
+ | gridlines: { color: '#fff' }, | ||
+ | minorGridlines: { count: 0 }, | ||
+ | viewWindow: { } | ||
+ | }, | ||
+ | series: [ ], | ||
+ | trendlines: [ ] | ||
+ | }; | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
data = {}; | data = {}; |