Skip to content
Closed
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: 1 addition & 1 deletion src/js/stores/SessionStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ var _session = {
emSize: 10,
width: 640,
timerOn: (localStorage.hasOwnProperty("model") === true),
nowOffset: getTZOffset(now),
nowOffset: now.getTimezoneOffset(),

@jstray jstray Aug 1, 2017

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually this line I am not sure about. I couldn't find getTZOffset() anywhere in the code base -- is this an equivalent replacement? Perhaps not, because I don't think the "your current time zone" format looks right. After this change it's in minutes, rather than a string like "-07:00"

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok after further research I am sure this is wrong. Is there any way to exclude a single file from a commit... or should I just add a new commit which fixes, and then add it to the PR?

now: now
};

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