diff --git a/ADDING-NEW-CHARTING-LIBRARY.md b/ADDING-NEW-CHARTING-LIBRARY.md index fda1899..6e924f3 100644 --- a/ADDING-NEW-CHARTING-LIBRARY.md +++ b/ADDING-NEW-CHARTING-LIBRARY.md @@ -8,7 +8,7 @@ Need to add new JS charting library for the project or application. This command update your bower.json and index html -##Steps +##Steps to be followed 1. Create a new factory inside the **chart-factory** with extending Global Chart Factory. ```javascript @@ -21,14 +21,14 @@ angular.module('apacheZeppelinGsocApp').factory('MyNewChartFactory', function( //To-Do Implement or add new chart }); ``` -1.1. Supporting chart types need to define in ChartList array as below + 1.1. Supporting chart types need to define in ChartList array as below ```javascript var ChartList = { 'Bar': 'BarChart', 'Line': 'LineChart' }; ``` -1.2. Develop the rest of method you need from you charting library + 1.2. Develop the rest of method you need from you charting library 2. Factories are expose from **ChartService**. Therefore you can add new services (only one method) that is using new factory. @@ -47,8 +47,9 @@ var ChartList = { 'service': 'getHighChart', 'template': 'views/charts/highchart.html' ``` +Make sure you add you test cases and unit test for new chart library factory. -Run +##Build, Test and Run * `npm install` first, If you hav not run it before. * `bower install` will download new library for application. diff --git a/app/scripts/chart-factory/high-chart-factory.js b/app/scripts/chart-factory/high-chart-factory.js index 8d59daf..d2b2021 100644 --- a/app/scripts/chart-factory/high-chart-factory.js +++ b/app/scripts/chart-factory/high-chart-factory.js @@ -4,6 +4,7 @@ * @name apacheZeppelinGsocApp.HighChartFactory * @description * # Extending Gobal Chart Factory for High Chart Model + *You can find high chart api in http://api.highcharts.com/highcharts#exporting * */ angular.module('apacheZeppelinGsocApp').factory('HighChartFactory', function( @@ -15,14 +16,29 @@ angular.module('apacheZeppelinGsocApp').factory('HighChartFactory', function( //highChart model var HighChartChartModel = { options: { + exporting: { + enabled: false + }, chart: { type: 'bar' } }, + title: { + text:'' + }, + subtitle: { + text:'' + }, + credits: { + enabled:false + }, + legend:{ + }, xAxis: { categories: [] }, series: [{ + name: 'populartiy', data: [] }], size: { diff --git a/app/styles/chart.css b/app/styles/chart.css index d01957f..79d97d7 100644 --- a/app/styles/chart.css +++ b/app/styles/chart.css @@ -1,5 +1,5 @@ /*nvd3 chart svg size fixing */ svg { - width: 550px !important; - height: 350px !important; + width: 550px !important; + height: 350px !important; } \ No newline at end of file