Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add var decls to get compiling under ES6 #270

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/js/charts/cb-chart-grid/parse-chart-grid.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ function parseChartgrid(config, _chartProps, callback, parseOpts) {
var factor = Math.pow(10, maxPrecision);
gridSettings.type = _chartProps._grid.type || "line";

_computed = {
var _computed = {
//TODO look at entries for all series not just the first
data: bySeries.series[0].values.map(function(d){return +d.entry}),
hasColumn: false,
Expand Down
2 changes: 1 addition & 1 deletion src/js/charts/cb-xy/parse-xy.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ function parseXY(config, _chartProps, callback, parseOpts) {

if (bySeries.isNumeric) {
scale.isNumeric = bySeries.isNumeric;
_computed = {
var _computed = {
//TODO look at entries for all series not just the first
data: bySeries.series[0].values.map(function(d){return +d.entry}),
hasColumn: false,
Expand Down
2 changes: 1 addition & 1 deletion src/js/components/ChartExport.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ var ChartExport = React.createClass({
},

downloadPNG: function() {
filename = this._makeFilename("png");
var filename = this._makeFilename("png");
saveSvgAsPng.saveSvgAsPng(this.state.chartNode, filename, { scale: 2.0 });
},

Expand Down
4 changes: 2 additions & 2 deletions src/js/components/shared/DataInput.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ var DataInput = React.createClass({

_handleReparseUpdate: function(k, v) {
if (k == "input") {
input = update(this.props.chartProps.input, { $merge: {
var input = update(this.props.chartProps.input, { $merge: {
raw: v,
type: undefined
}});
ChartViewActions.updateInput(k, input);
} else if (k == "type") {
input = update(this.props.chartProps.input, { $set: {
var input = update(this.props.chartProps.input, { $set: {
raw: v.raw,
type: v.type
}});
Expand Down
2 changes: 2 additions & 0 deletions src/js/util/parse-delimited-input.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,13 +131,15 @@ function cast_data(input, columnNames, stripCharsRegex, opts) {

var index_types = unique(all_index_types);

/* Dead code, hasDate/isNumeric never used, and strict mode complains about assignment to undefined
if(index_types.length !== 1 && !opts.type) {

}
else {
hasDate = opts.type ? opts.type == "date" : index_types[0] === "date";
isNumeric = opts.type ? opts.type == "numeric" : index_types[0] === "number";
}
*/

return {
data: data,
Expand Down
2 changes: 1 addition & 1 deletion src/js/util/validate-data-input.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ var some = require("lodash/some");
var unique = require("lodash/uniq");
var catchChartMistakes = require("./catch-chart-mistakes");

types = {
let types = {
"number": "numeric",
"object": "date",
"string": "ordinal"
Expand Down