-
Notifications
You must be signed in to change notification settings - Fork 13.9k
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
[explore] improve bubble viz #2927
Conversation
mistercrunch
commented
Jun 8, 2017
- allow for custom axis formatters
- reorg the control panels
2ead0e8
to
6e53a54
Compare
} | ||
if (chart.yAxis !== undefined) { | ||
chart.yAxis.tickFormat(d3.format('.3s')); | ||
if (chart.hasOwnProperty('y2Axis')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think if (chart.yAxis && chart.yAxis tickFormat)
would be less brittle here.
chart.hasOwnProperty('y2Axis')
would return true
even if the value is undefined
, in which case chart.y2Axis.tickFormat()
would throw an error. do we always know that chart
won't have the key with a value of false or undefined?
if (chart.hasOwnProperty('x2Axis')) { | ||
chart.x2Axis.tickFormat(xAxisFormatter); | ||
height += 30; | ||
} | ||
if (chart.hasOwnProperty('xAxis')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should check that chart.xAxis
is defined and has the key tickFormat
. can we assume that if the key is present that it has a value?
if (chart.xAxis && chart.xAxis tickFormat)
} else if (fd.x_axis_format !== undefined) { | ||
chart.xAxis.tickFormat(timeFormatFactory(fd.x_axis_format)); | ||
const yAxisFormatter = d3FormatPreset(fd.y_axis_format); | ||
if (chart.hasOwnProperty('yAxis')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here as well.
* allow for custom axis formatters * reorg the control panels
6e53a54
to
a456880
Compare