@data-ui/radial-chart
Advanced tools
Comparing version 0.0.47 to 0.0.48
{ | ||
"name": "@data-ui/radial-chart", | ||
"version": "0.0.47", | ||
"version": "0.0.48", | ||
"description": "A package for radial-axis visualizations https://williaster.github.io/data-ui", | ||
@@ -25,4 +25,4 @@ "main": "build/index.js", | ||
"dependencies": { | ||
"@data-ui/shared": "0.0.47", | ||
"@data-ui/theme": "0.0.47", | ||
"@data-ui/shared": "0.0.48", | ||
"@data-ui/theme": "0.0.48", | ||
"@vx/event": "0.0.140", | ||
@@ -29,0 +29,0 @@ "@vx/group": "0.0.140", |
@@ -64,4 +64,6 @@ # @data-ui/radial-chart | ||
### Tooltips | ||
The _easiest_ way to use tooltips out of the box is by passing a `renderTooltip` function to `<RadialChart />`. This function takes an object with the shape `{ event, datum, data, fraction }` as input and should return the inner contents of the tooltip (not the tooltip container!) as shown above. Under the covers this will wrap the `<RadialChart />` component in the exported `<WithTooltip />` HOC, which wraps the `svg` in a `<div />` and handles the positioning and rendering of an HTML-based tooltip with the contents returned by `renderTooltip()`. This tooltip is aware of the bounds of its container and should position itself "smartly". | ||
The _easiest_ way to use tooltips out of the box is by passing a `renderTooltip` function to `<RadialChart />`. This function takes an object with the shape `{ event, datum, data, fraction }` as input and should return the inner contents of the tooltip (not the tooltip container!) as shown above. If this function returns a `falsy` value, a tooltip will not be rendered. | ||
Under the covers this will wrap the `<RadialChart />` component in the exported `<WithTooltip />` HOC, which wraps the `svg` in a `<div />` and handles the positioning and rendering of an HTML-based tooltip with the contents returned by `renderTooltip()`. This tooltip is aware of the bounds of its container and should position itself "smartly". | ||
If you'd like more customizability over tooltip rendering you can do either of the following: | ||
@@ -78,3 +80,3 @@ | ||
className | PropTypes.string | - | Class name to add to the `<div>` container wrapper | ||
renderTooltip | PropTypes.func.isRequired | - | Renders the _contents_ of the tooltip, signature of `({ event, data, datum, fraction }) => node` | ||
renderTooltip | PropTypes.func.isRequired | - | Renders the _contents_ of the tooltip, signature of `({ event, data, datum, fraction }) => node`. If this function returns a `falsy` value, a tooltip will not be rendered. | ||
styles | PropTypes.object | {} | Styles to add to the `<div>` container wrapper | ||
@@ -92,9 +94,1 @@ TooltipComponent | PropTypes.func or PropTypes.object | `@vx`'s `TooltipWithBounds` | Component (not instance) to use as the tooltip container component. It is passed `top` and `left` numbers for positioning | ||
Although pie 🍰 and donut 🍩 charts are frequently encountered, they are not the most _effective_ visualization for conveying quantitative information. With that caveat, when used well they can effectively give an overview of population makeup which is an entirely reasonable use of these charts. We don't recommend using >7 slices for user readability. | ||
## @data-ui packages | ||
- <a href="https://github.com/williaster/data-ui/tree/master/packages/xy-chart" target="_blank">@data-ui/xy-chart</a>[![Version](https://img.shields.io/npm/v/@data-ui/xy-chart.svg?style=flat)](https://img.shields.io/npm/v/@data-ui/xy-chart.svg?style=flat) | ||
- @data-ui/radial-chart [![Version](https://img.shields.io/npm/v/@data-ui/radial-chart.svg?style=flat)](https://img.shields.io/npm/v/@data-ui/radial-chart.svg?style=flat) | ||
- <a href="https://github.com/williaster/data-ui/tree/master/packages/data-table" target="_blank">@data-ui/data-table</a> [![Version](https://img.shields.io/npm/v/@data-ui/data-table.svg?style=flat)](https://img.shields.io/npm/v/@data-ui/data-table.svg?style=flat) | ||
- <a href="https://github.com/williaster/data-ui/tree/master/packages/data-ui-theme" target="_blank">@data-ui/theme</a> [![Version](https://img.shields.io/npm/v/@data-ui/theme.svg?style=flat)](https://img.shields.io/npm/v/@data-ui/theme.svg?style=flat) | ||
- <a href="https://github.com/williaster/data-ui/tree/master/packages/demo" target="_blank">@data-ui/demo</a> |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
445768
1563
92
+ Added@data-ui/shared@0.0.48(transitive)
+ Added@data-ui/theme@0.0.48(transitive)
+ Added@vx/bounds@0.0.147(transitive)
+ Added@vx/tooltip@0.0.147(transitive)
- Removed@data-ui/shared@0.0.47(transitive)
- Removed@data-ui/theme@0.0.47(transitive)
- Removed@vx/bounds@0.0.143(transitive)
- Removed@vx/tooltip@0.0.143(transitive)
Updated@data-ui/shared@0.0.48
Updated@data-ui/theme@0.0.48