Skip to content

Chart utils tweaks#479

Merged
cerinman merged 5 commits into
masterfrom
tommy/chart-utils-tweaks
Dec 14, 2016
Merged

Chart utils tweaks#479
cerinman merged 5 commits into
masterfrom
tommy/chart-utils-tweaks

Conversation

@cerinman
Copy link
Copy Markdown
Contributor

We were running into issues where the internal widgets axis ranges/ticks were not matching the mobile applications ranges/ticks. To solve the problem, I've ported the mobile c++ code over and revamped the Chart Utils file. Eventually I'll port more of the mobile teams code but for now this allows our line charts to be in parity with theirs.

This only has an effect on the TimeBasedLineChart in the open source but will also effect the internal NetWorth chart. I'll have screen shots in the internal PR showing how the graphs now look but the gist is that the y range and tick values are dialed in closer so that the line changes between points more dramatically.

@jmophoto Once this goes live you can start using it in Insight/Target as well.

@redperk
Copy link
Copy Markdown
Contributor

redperk commented Dec 14, 2016

:shipit:

Copy link
Copy Markdown
Contributor

@jtanner jtanner left a comment

Choose a reason for hiding this comment

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

Looks good, just one suggestion.

Comment thread src/components/TimeBasedLineChart.js Outdated

const min = d3.min(this.props.data, d => {
return d.y;
});
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What do you think about using the new shorthand style implicit returns to make these (and the ones in the other files) a tiny bit easier to read?

const max = d3.max(this.props.data, d => d.y);
const min = d3.min(this.props.data, d => d.y);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yep, I'm good with that. I'll make the change.

Copy link
Copy Markdown
Contributor

@jtanner jtanner left a comment

Choose a reason for hiding this comment

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

:shipit:

@cerinman cerinman merged commit 819aa57 into master Dec 14, 2016
@cerinman cerinman deleted the tommy/chart-utils-tweaks branch December 14, 2016 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants