predixdesignsystem / px-vis-xy-chart

For a live demo of this predix UI component, visit
https://www.predix-ui.com/#/modules/px-vis-xy-chart
Apache License 2.0
1 stars 20 forks source link

On zoom, axis number line should round off 2 decimal precision. #18

Closed kunalrjain closed 7 years ago

kunalrjain commented 7 years ago

Hi,

I found few issues or enhancements in this component.

Actual Behavior

Expected behavior

Click on zoom icon.

Environment

All environments.

Screenshots

Issue 1 and Issue 2

capture

Issue 3

capture1

benoitjchevalier commented 7 years ago

1 and 2 can be done through tickFormat in axisConfig. You can find more information in the API of px-vis-axis in the vis framework guide: https://www.predix-ui.com/#/components/px-vis/ (select px-vis-axis in the dropdown at the top).

I'm not sure what we want to do about 3, this is done on purpose for different reasons, mostly that the chart might be drawing some things on the right (in the case of a multi Y axis chart for example). It would be possible to add a feature to pass some kind of clippath padding but I'm not sure how useful that would be and how much we would prioritize it.

kunalrjain commented 7 years ago

"tickFormat": Px.d3.format(".2s") in axisConfig fixed my issue. It would be great if we can have this as part of demo page.

Thank you !!