github graphieros/vue-data-ui v3.18.0

12 hours ago

Add types to all slots

  • Type definitions for all slots were improved and have autocomplete in the templates:
image

Examples of TS implementations for all components were added here.

VueUiXy: new option to show lines as steps (staircase) #329

const dataset = computed<VueUiXyDatasetItem[]>(() => {
  return [
    {
      name: 'Staircase',
      type: 'line',
      series: [0, 1, 1, 2, 3, 5, 8, 13, 21],
      useStepper: true // new, for line types only
    }
  ]
})
image

See examples here and here (with area)

VueUiCirclePack

  • Improve packing algorithm to place more smaller circles in the spaces between larger ones

Zoom minimaps

  • Fixed drag issue that could occur with very large datasets

New adaptColorToBackground utility function

  • Handy when customising datapoint contents with texts, when not knowing in advance their background color.
import { adaptColorToBackground } from "vue-data-ui/utils";

// The background color can be of any format (rgb, rgba, hsl, oklch, name color)
const textColor1 = adaptColorToBackground('#000000') // Result: '#FFFFFF'
const textColor2 = adaptColorToBackground('#FFFFFF') // Result: '#000000',
const textColor3 = adaptColorToBackground('#000000', {
    light: '#00FF00',
    dark: '#FF0000'
}) // Result: '#00FF00'
const textColor4 = adaptColorToBackground('#FFFFFF', {
    light: '#00FF00',
    dark: '#FF0000'
}) // Result: '#FF0000'

Docs are up to date

Don't miss a new vue-data-ui release

NewReleases is sending notifications on new releases.