github graphieros/vue-data-ui v3.5.0

one day ago

Programmatically toggle series visibility #261

Expose new functions to toggle series visibility:

showSeries: (name: string) => void
hideSeries: (name: string) => void

Set a ref on your chart component to call exposed methods:

<VueUiXy ref="chart" :dataset="dataset" :config="config" />

Example:

const chart = ref(null); // Add this ref on the chart component

function showSeriesByName(name) {
  if (!chart.value) return;
  chart.value.showSeries(name);
}

function hideSeriesByName(name) {
  if (!chart.value) return;
  chart.value.hideSeries(name);
}

Components affected:

  • VueUiDonut
  • VueUiDonutEvolution
  • VueUiGalaxy
  • VueUiHistoryPlot
  • VueUiHorizontalBar
  • VueUiNestedDonuts
  • VueUiOnion
  • VueUiParallelCoordinatePlot
  • VueUiQuadrant
  • VueUiRadar
  • VueUiRidgeline
  • VueUiRings
  • VueUiScatter
  • VueUiSparkStackbar
  • VueUiStackbar
  • VueUiTreemap
  • VueUiWaffle
  • VueUiXy
  • VueUiXyCanvas

Documentation website is up to date

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

NewReleases is sending notifications on new releases.