Open C261193 opened 6 years ago
Working fine in chrome.in Console
this.option2 = { chart: { type: 'lineWithFocusChart', height: 450, margin : { top: 20, right: 20, bottom: 40, left: 55 }, x: function(d){ return d.x; }, y: function(d){ return d.y; }, useInteractiveGuideline: true, dispatch: { stateChange: function(e){ console.log("stateChange"); }, changeState: function(e){ console.log("changeState"); }, tooltipShow: function(e){ console.log("tooltipShow"); }, tooltipHide: function(e){ console.log("tooltipHide"); } }, xAxis: { axisLabel: 'X Axis', tickFormat: function(d){ return d3.format('f')(d); }, axisLabelDistance: -10 }, y1Axis: { axisLabel: 'Y Axis', tickFormat: function(d){ return d3.format('.2f')(d); }, axisLabelDistance: -10 }, y2Axis:{ axisLabel: 'Y2 Axis', tickFormat: function(d){ return d3.format('.2f')(d); }, axisLabelDistance: -10 }, callback: function(chart){ console.log('end time', new Date()); console.log("!!! lineChart callback !!!"); } }
<nvd3 [options]="option2" [data]="data1"> <button (click)=saveImage()>Export As Image
Working fine in chrome.in Console
this.option2 = { chart: { type: 'lineWithFocusChart', height: 450, margin : { top: 20, right: 20, bottom: 40, left: 55 }, x: function(d){ return d.x; }, y: function(d){ return d.y; }, useInteractiveGuideline: true, dispatch: { stateChange: function(e){ console.log("stateChange"); }, changeState: function(e){ console.log("changeState"); }, tooltipShow: function(e){ console.log("tooltipShow"); }, tooltipHide: function(e){ console.log("tooltipHide"); } }, xAxis: { axisLabel: 'X Axis', tickFormat: function(d){ return d3.format('f')(d); }, axisLabelDistance: -10 }, y1Axis: { axisLabel: 'Y Axis', tickFormat: function(d){ return d3.format('.2f')(d); }, axisLabelDistance: -10 }, y2Axis:{ axisLabel: 'Y2 Axis', tickFormat: function(d){ return d3.format('.2f')(d); }, axisLabelDistance: -10 }, callback: function(chart){ console.log('end time', new Date()); console.log("!!! lineChart callback !!!"); } }
<nvd3 [options]="option2" [data]="data1"> <button (click)=saveImage()>Export As Image