github graphieros/vue-data-ui v3.20.0

latest releases: v3.20.5-beta.1, v3.20.5-beta.0, v3.20.6...
4 hours ago

All components with emits

  • Add type definitions for emits

VueUiXy #336

Add support for continuous series, where both coordinates are explicitly defined and x values may be irregularly spaced. Continuous (x,y) series are only available for 'line' and 'plot' chart types. If bar types are mixed with continuous series, bars will not be displayed, and a warning will show in the console.

// Continuous line dataset:
const dataset = computed<VueUiXyDatasetItem[]>(() => {
  return [
    {
      name: 'Series A',
      type: 'line', // also works for 'plot' type, but not 'bar' which will only show with number[] series
      series: [
        { x: 0.2, y: 12 },
        { x: 0.8, y: 25 },
        { x: 1.6,  y: 18 },
      ]
    }
  ]
});

The config API is also extended to support different aspects of the continuous rendering:

const config = computed<VueUiXyConfig>(() => ({
  chart: {
    grid: {
      labels: {
        xAxis: {
          /**
          * For continuous mode:
          * . line and plot types
          * . series with Array<{x, y}> instead of number[]
          */
          commonScaleSteps: 10, // new
          useNiceScale: true, // new
          scaleMin: null, // new
          scaleMax: null, // new
          rounding: 1, // new
          formatter: null, // new
          reverse: false, // new, reverse the x-axis scale
        },
        yAxis: {
            reverse: false, // new, reverse the y-axis scale
        }
      }
    }
  }
}))

View an example

Docs are up to date

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

NewReleases is sending notifications on new releases.