Skip to content

Commit 6f219db

Browse files
authored
Merge pull request #13 from chartjs/Add_CI
Add travis CI & fix JShint issues
2 parents ffe0efb + d34befc commit 6f219db

File tree

4 files changed

+39
-9
lines changed

4 files changed

+39
-9
lines changed

.travis.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
language: node_js
2+
node_js:
3+
- "6.2"
4+
5+
before_install:
6+
- "export CHROME_BIN=/usr/bin/google-chrome"
7+
- "export DISPLAY=:99.0"
8+
- "sh -e /etc/init.d/xvfb start"
9+
10+
before_script:
11+
- npm install
12+
13+
script:
14+
- gulp jshint
15+
16+
sudo: required
17+
dist: trusty
18+
19+
addons:
20+
firefox: latest
21+
apt:
22+
sources:
23+
- google-chrome
24+
packages:
25+
- google-chrome-stable

config.jshintrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"node": true,
3+
"predef": [ "require", "module" ]
4+
}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"gulp-util": "^3.0.7",
2121
"inquirer": "^1.0.2",
2222
"jshint": "^2.9.2",
23+
"jshint-stylish": "^2.2.0",
2324
"merge-stream": "^1.0.0",
2425
"semver": "^5.1.0",
2526
"vinyl-source-stream": "^1.1.0"

src/chart.zoom.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ function doZoom(chartInstance, zoom, center) {
8181
center = {
8282
x: (ca.left + ca.right) / 2,
8383
y: (ca.top + ca.bottom) / 2,
84-
}
84+
};
8585
}
8686

8787
var zoomOptions = chartInstance.options.zoom;
@@ -164,14 +164,14 @@ function positionInChartArea(chartInstance, position) {
164164
}
165165

166166
// Store these for later
167-
zoomNS.zoomFunctions['category'] = zoomIndexScale;
168-
zoomNS.zoomFunctions['time'] = zoomTimeScale;
169-
zoomNS.zoomFunctions['linear'] = zoomNumericalScale;
170-
zoomNS.zoomFunctions['logarithmic'] = zoomNumericalScale;
171-
zoomNS.panFunctions['category'] = panIndexScale;
172-
zoomNS.panFunctions['time'] = panTimeScale;
173-
zoomNS.panFunctions['linear'] = panNumericalScale;
174-
zoomNS.panFunctions['logarithmic'] = panNumericalScale;
167+
zoomNS.zoomFunctions.category = zoomIndexScale;
168+
zoomNS.zoomFunctions.time = zoomTimeScale;
169+
zoomNS.zoomFunctions.linear = zoomNumericalScale;
170+
zoomNS.zoomFunctions.logarithmic = zoomNumericalScale;
171+
zoomNS.panFunctions.category = panIndexScale;
172+
zoomNS.panFunctions.time = panTimeScale;
173+
zoomNS.panFunctions.linear = panNumericalScale;
174+
zoomNS.panFunctions.logarithmic = panNumericalScale;
175175

176176
// Chartjs Zoom Plugin
177177
var zoomPlugin = {

0 commit comments

Comments
 (0)