-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scale Grouping #181
Comments
Hi @sevsev9 This is a great idea!
chart: {
scaleGroups: {
enable: true, // default: false
groups: [
{ name: 'percentage', scaleMin: null, scaleMax: null },
// ... and so many as one needs
], // default: []
}
} All while keeping scaleGroup defined in series, as you proposed. I'll keep you posted, hopefully with a beta. Cheers |
I agree, this sure would be hard to pull off. But what also might be a more simple approach is: If scaleMin and scaleMax are the exact same for multiple data sets, automatically show only one scale? Then of course, the Maybe group them if scaleMin + scaleMax + scaleName is the same across multiple datasets? |
This would work if the scale name was not the series name, which it is currently. |
Excuse me, I meant |
Looks like an interesting path |
Currently I am trying to fit 8 datasets with 2 scales into one diagram, but half the diagram is scales. I've done a rather ugly workaround now which confines the scales to the left side and effectively makes them unreadable ( Do you have a better workaround currently? Can the scales be hidden entirely? |
Unfortunately not, sorry for that, not even css classes to grab. |
Thank you, I really love this project, is there a way to sponsor it? I like to sponsor the projects I use often. |
That's very nice to offer, I did not set up sponsoring for now, I'd rather get good PRs ;) |
Oh You can probably hide the scales using the #svg slot, by sticking a rect with the same bg color as the chart bg. <VueUiXy :dataset="dataset" :config="config">
<template #svg="{ svg }">
<rect :x="0" :y="0" :width="24" :height="svg.height" fill="red"/>
</template>
</VueUiXy> |
Can you try out Setting common You will need to set this additional config option to control the color of scale groups (will be applied on all grouped scales): const config: VueUiXyConfig = {
chart: {
grid: {
labels: {
yAxis: {
groupColor: '#1A1A1A', // default: null, if not set, will default to a series color
scaleLabelOffsetX: 0, // default: 0
scaleValueOffsetX: 0, // default: 0
}
}
}
}
} |
Thank you! I will try both this afternoon! (I'm PST) |
@sevsev9 no need to try hiding the scales, as upgrading to PS. Thanks for the funny dataset, which made me crave pizza at 6am ^^ |
That's amazing, thank you! |
Is your feature request related to a problem? Please describe.
Currently, when visualizing multiple datasets in a VueUiXy chart, enabling
chart.grid.yAxis.useIndividualScales = true
assigns each series its own scale. This becomes problematic when I want to compare two distinct groups of data—such as one group representing percentages and another representing total counts—using only two separate scales. The lack of scale grouping makes it difficult to visually compare related metrics in a single chart.Describe the solution you'd like
Introduce a "scale group" property on each dataset item that allows multiple series to share the same y-axis scale. For example, if datasets are assigned
scaleGroup: "percentage"
orscaleGroup: "total"
, the chart would automatically create one y-axis for each group. This would allow, for instance, all percentage-based datasets to use one scale and all total-based datasets to use another, while still displaying all series in one cohesive chart.Describe alternatives you've considered
Alternatives include merging datasets into a single series or rendering separate charts for each scale group. However, these approaches either reduce clarity or force a disjointed user experience. Manually adjusting each scale is also not a scalable solution.
Additional context
This feature would greatly improve readability in dashboards where different types of metrics must be visualized together—such as financial data, performance metrics, or any scenario where two distinct scales are required. Providing this functionality would allow users to easily toggle and compare data across different units while keeping the visualization clear and cohesive.
If you consider the following example of 4 or more datasets, each in a scale group, half the diagram becomes just scales eventually.
I think this would make an outstanding addition to the already phenomenal data visualization library, as it would enable very information dense XY charts.
The text was updated successfully, but these errors were encountered: