-
Notifications
You must be signed in to change notification settings - Fork 122
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
[Goal] Full circle is cut off when container is resized #1598
Comments
export const Example = () => (
<Chart>
<Settings baseTheme={useBaseTheme()} />
<Goal
id="spec_1"
subtype={subtype}
base={0}
target={260}
actual={280}
bands={[200, 250, 300]}
ticks={[0, 50, 100, 150, 200, 250, 265, 280]}
tickValueFormatter={({ value }: BandFillColorAccessorInput) => String(value)}
bandFillColor={({ value }: BandFillColorAccessorInput) => bandFillColor(value)}
labelMajor=""
labelMinor=""
centralMajor="280 MB/s"
centralMinor=""
angleStart={Math.PI / 2}
angleEnd={-(Math.PI + Math.PI / 2)}
/>
</Chart>
); |
it looks strage (with a padding on the top), can you please check this link https://elastic.github.io/elastic-charts/?path=/story/goal-alpha--full-circle&globals=theme:light |
@markov00, about cutting the bottom: https://codesandbox.io/s/festive-yalow-d1rsik?file=/src/App.tsx |
@markov00, here is a difference: your example: angleStart={Math.PI + Math.PI / 2}
angleEnd={-Math.PI / 2} my example: angleStart={Math.PI / 2}
angleEnd={-(Math.PI + Math.PI / 2)} Your example is working perfectly, but I need the indicator of value to start from the top point of the circle. |
oh that's interesting thanks, I will take a look and see what is going on there |
@markov00, thanks a lot) |
the issue is caused by a wrong calculation of the saggitta introduced here: #1413 |
Problem description
While trying to replace the
vislib
gauge with the goal from theelastic-charts
, it has been found the further issue.If the
full circle
has been drawn and its container has been resized, the bottom of the circle is cut off and a lot of space on the top is left.Circle angle configuration
Current behavior
circle.cut.mov
Expected behavior
After the resizing, the circle should be in the middle of the container and should be resized according to the new size of the container.
Version:
Kibana Cross Issues:
The text was updated successfully, but these errors were encountered: