Skip to content

Commit

Permalink
Adding Common Chart View Variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Madhuka committed Jun 29, 2015
1 parent f0d300d commit a555875
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions app/scripts/controllers/chart-controllers.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,11 @@ angular.module('apacheZeppelinGsocApp').controller('ChartCtrl', function($scope,
case 'NVD3Chart':
//set data for NVD3
myNewChart = ChartService.getNVD3Chart(myChartType);
vm.data = myNewChart.viewModel.data;
vm.options = myNewChart.viewModel.options;
vm.chart = myNewChart.viewModel;
break;
case 'highChart':
myNewChart = ChartService.getHighChart(myChartType);
vm.chartConfig = myNewChart.viewModel;
vm.chart = myNewChart.viewModel;
break;
case 'googleChart':
myNewChart = ChartService.getGoogleChart(myChartType);
Expand Down
2 changes: 1 addition & 1 deletion app/views/charts/highchart.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="box">
<label>High Chart</label>
<highchart id="chart1" config="chartctrl.chartConfig"></highchart>
<highchart id="chart1" config="chartctrl.chart"></highchart>
</div>
2 changes: 1 addition & 1 deletion app/views/charts/nvd3chart.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="box">
<label>NVD3 Chart</label>
<nvd3 options='chartctrl.options' data='chartctrl.data'></nvd3>
<nvd3 options='chartctrl.chart.options' data='chartctrl.chart.data'></nvd3>
</div>

0 comments on commit a555875

Please sign in to comment.