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

Negative radius for circle and diamond shapes in TileMap #18647

Closed
hemanthreddyk opened this issue Mar 10, 2023 · 1 comment · Fixed by #18657
Closed

Negative radius for circle and diamond shapes in TileMap #18647

hemanthreddyk opened this issue Mar 10, 2023 · 1 comment · Fixed by #18657
Assignees

Comments

@hemanthreddyk
Copy link

Expected behaviour

When there is a single data point in the series, circle and diamond shape tiles should render on the chart with out error

Actual behaviour

Does not render the shape in the chart, with following error in browser console
Error: attribute r: A negative value is not valid. ("-2")

Live demo with steps to reproduce

https://jsfiddle.net/nwtquxfm/2/

  1. Open the above link
  2. Right click and go to browser console.
  3. You can see the above mentioned error
  4. Same error happens when tileShape is changed to diamond

Product version

Latest Stable

Affected browser(s)

All browsers

Screen Shot 2023-03-10 at 2 54 47 PM

@highsoft-bot highsoft-bot added this to To do in Development-Flow via automation Mar 10, 2023
@pawellysy
Copy link
Member

Thanks for reporting a bug @hemanthreddyk!

Internal note
The colsizePx is wrongly calculated here:

colsizePx = Math.abs(
clamp(
Math.floor(
xAxis.len -
xAxis.translate(
point.x + colsize,
0 as any,
1 as any,
0 as any,
0 as any
)
), -xAxis.len, 2 * xAxis.len
) - x
);

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

Successfully merging a pull request may close this issue.

4 participants