Skip to content
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

V3: Vue 3 SFC/composition api support #72

Closed
palerdot opened this issue Feb 29, 2024 · 1 comment
Closed

V3: Vue 3 SFC/composition api support #72

palerdot opened this issue Feb 29, 2024 · 1 comment

Comments

@palerdot
Copy link
Owner

palerdot commented Feb 29, 2024

v3 version of vue-speedometer is released. It is a complete rewrite with composition api and SFC (single file component).

Ref: https://stackblitz.com/edit/vitejs-vite-zvyaxz?file=package.json

Important Changes

Vue 3 support:

  • Composition api and SFC support. Please note while v2 technically supports Vue 3 versions, underneath it used options api. V3 is a complete rewrite with composition api and SFC. This is the recommended version for Vue 3 composition api users.

Slim Build (Experimental)

There is a Slim build available without bundling d3. This project uses d3 micro bundles. If your project also uses d3 microbundles, you can opt for slim build. Necessary d3 dependencies required for slim build to work are - d3-array, d3-color, d3-ease, d3-format, d3-interpolate, d3-scale, d3-selection, d3-shape, d3-transition.

// sample slim build usage
import VueSpeedometer from "vue-speedometer/slim"
// and use it
<VueSpeedometer />

Other changes

  • segmentValueFormatter prop which accepts a function to format values
  • switching to d3 micro modules
@palerdot palerdot pinned this issue Feb 29, 2024
@palerdot
Copy link
Owner Author

v3.0.1 is published and v3 is generally available.

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

No branches or pull requests

1 participant