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

516: Chart transform is not working properly #72

Open
Kashargul opened this issue Jan 24, 2025 · 1 comment
Open

516: Chart transform is not working properly #72

Kashargul opened this issue Jan 24, 2025 · 1 comment

Comments

@Kashargul
Copy link
Contributor

Kashargul commented Jan 24, 2025

When placing a chart, the transform is offset from where it should be. Resizing of the window also keeps it the same, leading to the entire chart being outside the boarders.

Image

Image

<Stack>
  <Stack.Item mx={0.5} grow={1}>
    <Section fill position="relative" height="100%">
      <Chart.Line
        data={supplyData}
        rangeX={[0, supplyData.length - 1]}
        rangeY={[0, maxValue]}
        strokeColor="rgba(0, 181, 173, 1)"
        fillColor="rgba(0, 181, 173, 0.25)"
      />
      <Chart.Line
        data={demandData}
        rangeX={[0, demandData.length - 1]}
        rangeY={[0, maxValue]}
        strokeColor="rgba(224, 57, 151, 1)"
        fillColor="rgba(224, 57, 151, 0.25)"
      />
    </Section>
  </Stack.Item>
</Stack>
  handleResize = () => {
    const element = this.ref.current;
    if (!element) {
      return;
    }

likely the current ref is null?

@AyIong
Copy link
Contributor

AyIong commented Jan 24, 2025

Look's like absolute issue

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

2 participants