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

[charts] series not drawing since v6.0.0-alpha.8 #10257

Closed
2 tasks done
Sozialarchiv opened this issue Sep 7, 2023 · 13 comments · Fixed by #10272
Closed
2 tasks done

[charts] series not drawing since v6.0.0-alpha.8 #10257

Sozialarchiv opened this issue Sep 7, 2023 · 13 comments · Fixed by #10272
Labels
bug 🐛 Something doesn't work component: charts This is the name of the generic UI component, not the React module!

Comments

@Sozialarchiv
Copy link

Sozialarchiv commented Sep 7, 2023

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Steps to reproduce 🕹

I used the single chart example from the docs, but it affects all chart types.

import * as React from 'react';
import { BarChart } from '@mui/x-charts/BarChart';

export default function SimpleCharts() {
  return (
    <BarChart
      xAxis={[
        {
          id: 'barCategories',
          data: ['bar A', 'bar B', 'bar C'],
          scaleType: 'band',
        },
      ]}
      series={[
        {
          data: [2, 5, 3],
        },
      ]}
      width={500}
      height={300}
    />
  );
}

Current behavior 😯

v6.0.0-alpha.8 and v6.0.0-alpha.9

grafik

Expected behavior 🤔

It works in v6.0.0-alpha.7

grafik

Context 🔦

No response

Your environment 🌎

npx @mui/envinfo
  Don't forget to mention which browser you used.
  Output from `npx @mui/envinfo` goes here.

Order ID or Support key 💳 (optional)

No response

@Sozialarchiv Sozialarchiv added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Sep 7, 2023
@LukasTy
Copy link
Member

LukasTy commented Sep 7, 2023

Hello, I was unable to reproduce your issue in both StackBlitz as well as locally with the latest release. 🤷
Please provide a minimal reproduction test case with the latest version. This would help a lot. 🙏
A live example would be perfect. This StackBlitz template may be a good starting point. Thank you!

@LukasTy LukasTy added status: waiting for author Issue with insufficient information component: charts This is the name of the generic UI component, not the React module! and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Sep 7, 2023
@Sozialarchiv
Copy link
Author

I am using symfony encore. I will try to create a test case.

@github-actions github-actions bot removed the status: waiting for author Issue with insufficient information label Sep 7, 2023
@Sozialarchiv
Copy link
Author

Sozialarchiv commented Sep 8, 2023

I found the reason:

I changed tsconfig.js in the following way:

before:

{
  "compilerOptions": {
    "module": "commonjs",

after:

{
  "compilerOptions": {
    "module": "esnext",
    "moduleResolution": "node",

and now it is running also with v6.0.0-alpha.8 and v6.0.0-alpha.9. So I guess a change in .8 made it incompatible with commonjs.

@Sozialarchiv
Copy link
Author

If I revert this commit #10111 it is also working with commonjs

@LukasTy
Copy link
Member

LukasTy commented Sep 8, 2023

If I revert this commit #10111 it is also working with commonjs

What if you apply this fix that we are going to release: #10263?

@Sozialarchiv
Copy link
Author

Unfortunately it is not solving the issue.

Thank you very much for your support.

@Janpot
Copy link
Member

Janpot commented Sep 8, 2023

@Sozialarchiv Would you mind sharing a full reproduction? One we can download and run for ourselves? Could you also try it with the changes proposed in #10272?

@Sozialarchiv
Copy link
Author

@Janpot Of course. I tried it already with StackBlitz but I could not make. I will create a github repository. I will try to make it as minimal as possible.

@Sozialarchiv
Copy link
Author

https://github.com/Sozialarchiv/charts-commonjs-test

@Janpot
Copy link
Member

Janpot commented Sep 8, 2023

@Sozialarchiv Thank you, this is very helpful! It looks like it works for me after I apply the updates of https://github.com/mui/mui-x/pull/10272/files in ./node_modules/@mui/x-charts/package.json. Could you confirm?

@Sozialarchiv
Copy link
Author

It works with #10272.

Thank you very much.

@Sozialarchiv
Copy link
Author

And thank you for great library, too. The chart part is a very nice addition and completes the stack in a wonderful way.

@LukasTy
Copy link
Member

LukasTy commented Sep 8, 2023

And thank you for great library, too. The chart part is a very nice addition and completes the stack in a wonderful way.

Thanks and thank you for using the library in such an early stage and helping us solve such issues! 🙏

@LukasTy LukasTy added the bug 🐛 Something doesn't work label Sep 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: charts This is the name of the generic UI component, not the React module!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants