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

[Bug] Dt[_t] is not a constructor #19921

Closed
bhavyakelp opened this issue May 10, 2024 · 5 comments
Closed

[Bug] Dt[_t] is not a constructor #19921

bhavyakelp opened this issue May 10, 2024 · 5 comments
Labels
bug en This issue is in English inactive Not active for some time or no response from the author. Will be closed soon. pending We are not sure about whether this is a bug/new feature.

Comments

@bhavyakelp
Copy link

bhavyakelp commented May 10, 2024

Version

5.4.3

Link to Minimal Reproduction

https://echarts.apache.org/examples/en/editor.html?c=bar-simple&code=PYBwLglsB2AEC8sDeAoW7YCIDmAnCAJpgFzJoYWYDOAFsAO4mxi4CuApgDTkXqYA27AGZgmADm68MmfNhqjSEnr0xhQ4yVKwAjYGDUBbJgGYADJqmYAxjDABDCNAAyd7e35MWHCyt24C7LgA6oRgNEwAjD6UfgG4AMLA_MC4TJgAxPEA7PEAYgAiuZjKAL4-AuzY7NBEpKhaWHb8ENjQaYIimNHSKRDVClh0-ABetk1dyjF6hkzmk9IEdvZMANrzUvUNWpjQdgbsaQCCE1vbEGDsBgDKYACegkybpw3WSSlp6QBMEca5YqbFZ68ErrYHdDagl67fZpABCJyB0nOlxu9wOdUhz1eyVSpAyAFZPvkACz5fKAxHoEFAsqY9BPRE7PborDxLDgraYZHXO4PDGUyw2HEfXKHABsxIlFMp1OesqkAF0OVyLgYABLsFrySJzF4XAAeYFRfLIQOx7zxXyyn1hxgAogjTpghLYrhBhiyIqZQfLYLTKGokpAQI9QdQ6IxSF4uGG7CAQNUCAAVYCw4AEW6eNgxl4gOwEAiObCzZWxQKJYWWz7W20O0spOIhAhhSLKg1G3kshkvIUWrDpISDoeOzku6BgXJ7CD8TN4w4AN0C9lgNzsNTs_hHLzHRvdnuJPtLdisAGs8MBWDUK32MtWbfbpX7yvrDvqIFRQ3rbgm0lYlpUUk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GzrM0P1tygviYk_wBvfCyGVljFWOta1M5YSbER_rxsa8m4RS2M3DbDRps0Uq8TxBlVpqgOn3mtgcml9gYGV1OnoNBobM1C2iglFKPm5aRTiklMSC2FAX3D0Ncu9bWBPsA5-1rSD5Z90ZCHMOX7XHZmRBs5yQzzKTNw-BRZqzkLv5BVuAYXQ21rAQFwFYB4a0qCk_J5xFkSgvYMCuAzpI-VEahYRVzpzDKMVYvTu5vFmruc-dJeS-zkR-vBfpfZ8LLKsDss5fC-LbRE4ERQCUIAA

Steps to Reproduce

The graph component that I intent to create is similar to the one shown in the link above.

Current Behavior

Currently, I've developed a component named C1, which accepts data as input and renders it as illustrated in the provided code snippet. Subsequently, this C1 component is utilized in two distinct modules, M1 and M2, each within its respective components. The folder structure is organized as follows:

  • Components
    |----- C1 ( my echarts graph)

  • M1
    |------ MC1 -> C1

  • M2
    |------ MC2 -> C1

The issue I'm encountering is that while the graph functions correctly in M1, it fails to do so in M2, despite both modules receiving identical data for graph generation.

The error encountered in M2 is:
Dt[_t] is not a constructor

In the C1 component I initialise the graph using the following code snippet

this.chart = echarts.init(
      this.elementRef.nativeElement.querySelector(`#my-chart`),
      null,
      { renderer: 'canvas' },
    );

This image gives a detailed explanation for the issue faced.

Screenshot 2024-05-10 at 4 03 30 PM

Expected Behavior

Ideal behaviour is that it should work in both the modules.

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

@bhavyakelp bhavyakelp added the bug label May 10, 2024
@echarts-bot echarts-bot bot added en This issue is in English pending We are not sure about whether this is a bug/new feature. labels May 10, 2024
@bhavyakelp bhavyakelp changed the title Dt[_t] is not a constructor [Bug] Dt[_t] is not a constructor May 10, 2024
@plainheart
Copy link
Member

See if the FAQ helps.

@bhavyakelp
Copy link
Author

@plainheart Already checked the existing docs and support, but could not find anything constructive

@plainheart
Copy link
Member

Did you import and use the renderers, component and series?
https://echarts.apache.org/handbook/en/basics/import/#shrinking-bundle-size

@plainheart plainheart added waiting-for: author inactive Not active for some time or no response from the author. Will be closed soon. labels May 12, 2024
@echarts-bot echarts-bot bot closed this as not planned Won't fix, can't repro, duplicate, stale May 15, 2024
Copy link

echarts-bot bot commented May 15, 2024

This issue is closed due to not being active. Please feel free to open it again (for the author) or create a new one and reference this (for others) if you have further questions.

@bhavyakelp
Copy link
Author

Yes, it was some import issue. Imported CanvasRenderers and now it works fine. Thankyou!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug en This issue is in English inactive Not active for some time or no response from the author. Will be closed soon. pending We are not sure about whether this is a bug/new feature.
Projects
None yet
Development

No branches or pull requests

2 participants