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

Implement regions.label to .region() API #3731

Closed
netil opened this issue Apr 12, 2024 · 1 comment
Closed

Implement regions.label to .region() API #3731

netil opened this issue Apr 12, 2024 · 1 comment
Assignees

Comments

@netil
Copy link
Member

netil commented Apr 12, 2024

Description

regions.label option added on 3.10 (#3319), but not implemented on .regions() APIs.
Implement same way as the option provides.

chart.regions([
   {
     axis: "x",
     start: 1,
     end: 4,
     class: "region-1-4",
     label: {
     	text: "Region Text",
     	x: 5,  // position relative of the initial x coordinate
     	y: 5,  // position relative of the initial y coordinate
     	color: "red",  // color string
     	rotated: true  // make text to show in vertical or horizontal
     }
   }
]);

chart.regions.add({
   ...,
   label: { ... }
});

chart.regions([
   ...,
   { ..., label: { ... } }
]);
@netil netil added the feature label Apr 12, 2024
@netil netil self-assigned this Apr 12, 2024
@netil netil removed the feature label Apr 15, 2024
@netil
Copy link
Member Author

netil commented Apr 15, 2024

it already works as expected

@netil netil closed this as completed Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant