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
}
}
}
}
}))