graphieros / vue-data-ui

A user-empowering data visualization Vue 3 components library for eloquent data storytelling
https://vue-data-ui.graphieros.com/
MIT License
267 stars 13 forks source link

New feature - Target value display logic in VueUiSparkbar component #56

Closed lucaspmarra closed 2 weeks ago

lucaspmarra commented 2 weeks ago

Summary:

Added conditional logic to display target value in <VueUiSparkbar /> component.

Details:

Updated the component to show target value based on showTargetValue and showTargetValueText configuration. Adjusted logic to determine whether to use bar.target orconfig.style.layout.target for displaying target value, depending on the independant setting.

Impact:

This change ensures the target value is displayed correctly according to the configuration settings, improving the component’s flexibility and accuracy in displaying target values.

Discussion:

I'd ask you to test it too, here I've tested it with the independent target and also with the target coming from config.

TBD: How do you plan to deal with translations in the components - if there are fixed texts? I ask because currently, we pass texts to the component, via config or dataset, but what if we want to leave the message fixed, for example, “to” in the config of the showTargetValueText being changed to the respective translation in the user's language, only dealing with the translation in the client?

This time I removed the local dependencies (I think 😁)