Skip to content
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

XYChart2: Choose better series name for single dataset #85032

Open
Tracked by #85021
leeoniya opened this issue Mar 23, 2024 · 0 comments
Open
Tracked by #85021

XYChart2: Choose better series name for single dataset #85032

leeoniya opened this issue Mar 23, 2024 · 0 comments

Comments

@leeoniya
Copy link
Contributor

leeoniya commented Mar 23, 2024

x is sometimes shared, so we use the y field to identify each series, and usually take the name from it.

for datasets that do not contain frame names or labels to identify their "group" (e.g. from a transform), this doesnt really work well. this should probably be named generically "Series 1".

image

the tricky question here is how would users change this name (by override of Y field displayName) without also making the tooltip say

o MySeries
----------
Lat
My Series

internally, we use any common prefix and/or suffix of each y field as the series name, but when there is only one y field it becomes tricky. if we have a frame name that's different than y field name, we can use that, in this case it's the CSV file name:

image

we have some code in place for more advanced naming customization without resorting to manual mode but that's for future:

// /*
// replace?: {
// // default: 'field'
// source: 'field' | 'frame';
// // default: whatever is matched for y field
// matcher: common.MatcherConfig;
// // default: 'displayName'
// prop: 'displayName' | 'name' | 'query' | 'target';
// // similar to renameByRegex & RenameByRegexTransformerOptions
// // default: '(.*)'
// regex: string;
// // default: '$1'
// rename: string;
// }
// */

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant