I hereby claim:
- I am nbering on github.
- I am nbering (https://keybase.io/nbering) on keybase.
- I have a public key ASD__G9vus4Uvyo2M4BbjsMKGas4vnnyN8Ndzipw5rFj-Qo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
I just started this document as a place to record the little things I like to change in any editor... and what I change them to.
Yes.
(function(){ | |
angular.module('googlechart.smiffy', ['googlechart']) | |
.directive('onPage', onPageDirective) | |
.directive('onSort', onSortDirective) | |
.directive('smiffySelect', smiffySelectDirective) | |
.directive('smiffyDeselect', smiffyDeselectDirective); | |
/* Example: | |
<div google-chart chart="myChart" on-page="myPageHandler(page)"></div> | |
*/ |
/****************** | |
* Code originally written by Ben Jacobs (benmj) | |
* Modified by Weston Siegenthaler (Wsiengenthaler) and Nicholas Bering (Balrog30) | |
* Of GitHub Community. | |
******************/ | |
/*global angular: true, google: true, _ : true */ | |
'use strict'; |
angular.module('myApp', ['googlechart']) | |
.controller('myController', function($scope) { | |
var chart1 = {}; | |
chart1.type = "LineChart"; | |
chart1.displayed = false; | |
chart1.data = { | |
"cols": [ | |
{ id: "month", label: "Month", type: "string"}, | |
{ id: "laptop-id", label: "Laptop", type: "number"}, | |
{ id: "desktop-id", label: "Desktop", type: "number"}, |
angular.module('myApp', ['googlechart']) | |
.controller('myController', function($scope) { | |
var chart1 = {}; | |
chart1.type = "AreaChart"; | |
chart1.displayed = false; | |
chart1.data = { | |
"cols": [{ | |
id: "month", | |
label: "Month", | |
type: "string" |
/* | |
######### | |
Notes: | |
######### | |
- $scope.saleschart is the chart object passed to the directive. | |
- $scope.saleschart.data is and instance of google.visualization.DataTable, giving it access to that class's member functions. | |
I also discovered that being an instance of the Chart API class allows access to the functions, but results in and field or | |
property being obfuscated. Calling .toJSON() gives a JSON object of the DataTable, which helps in debugging... but I just | |
don't trust any names other than functions. | |
- $scope.saleschart.view.columns starts as an array like [0,1,2,3,4,5]. Having fewer values than the number of columns would |