Ero sivun ”Widget:JwObsCharts” versioiden välillä
Järvi-meriwikistä
Rivi 56: | Rivi 56: | ||
// add chart container | // add chart container | ||
− | //memo.widgetEl.append( '<div class="card JwCard mb-2" style="position: relative; width: 100%; height: 100%;"><div class="card-header">Otsikko</div><div class="card-body" style="position: relative; width: 100%; height: | + | //memo.widgetEl.append( '<div class="card JwCard mb-2" style="position: relative; width: 100%; height: 100%;"><div class="card-header">Otsikko</div><div class="card-body" style="position: relative; width: 100%; height: 100%;"><div class="chart-container" style="position: relative; z-index: 110; width: 100%; height: 100%;"></div></div><div class="card-footer">footer</div></div>' ); |
memo.widgetEl.append( '<div class="card JwCard mb-2" style="position: relative; width: 100%; height: 100%;"><div class="card-header"></div><div class="card-body p-2" style="position: relative; width: 100%; height: 350px;"><div class="chart-container" style="position: relative; z-index: 110; width: 100%; height: 100%;"></div></div></div>' ); | memo.widgetEl.append( '<div class="card JwCard mb-2" style="position: relative; width: 100%; height: 100%;"><div class="card-header"></div><div class="card-body p-2" style="position: relative; width: 100%; height: 350px;"><div class="chart-container" style="position: relative; z-index: 110; width: 100%; height: 100%;"></div></div></div>' ); | ||
//memo.widgetEl.append( '<div class="chart-container" style="position: absolute; z-index: 110; width: 100%; height: 100%;"></div>' ); | //memo.widgetEl.append( '<div class="chart-container" style="position: absolute; z-index: 110; width: 100%; height: 100%;"></div>' ); | ||
memo.chartEl = jQuery( this ).find( '.chart-container' ); | memo.chartEl = jQuery( this ).find( '.chart-container' ); | ||
− | memo.headerEl = jQuery( this ).find( '.card-header' ); | + | memo.chartEl.height( memo.height ); |
+ | memo.headerEl = jQuery( this ).find( '.card-header' ); | ||
+ | |||
// add title | // add title | ||
Rivi 113: | Rivi 115: | ||
drawVisualization(memo); | drawVisualization(memo); | ||
}); | }); | ||
− | |||
− | |||
memo.fullscreenEl.on( 'click', function() { | memo.fullscreenEl.on( 'click', function() { | ||
Rivi 270: | Rivi 270: | ||
csv = header + csv; | csv = header + csv; | ||
− | + | ||
var exportedFilename = memo.csvfile; | var exportedFilename = memo.csvfile; | ||
Rivi 1 373: | Rivi 1 373: | ||
memo.options.chartArea = { top: t, left: l, width: (w - l - r), height: (h - t - b), backgroundColor: { fill: '#fff', stroke: '#eee', strokeWidth: 4 }}; | memo.options.chartArea = { top: t, left: l, width: (w - l - r), height: (h - t - b), backgroundColor: { fill: '#fff', stroke: '#eee', strokeWidth: 4 }}; | ||
− | console.log( memo.options ); | + | //console.log( memo.options ); |
memo.chart.draw( memo.data, memo.options ); | memo.chart.draw( memo.data, memo.options ); |