question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to access 'getModel' function in typescript

See original GitHub issue

Version

5.2.2

Link to Minimal Reproduction

No response

Steps to Reproduce

  1. Create any chart
  2. on the chart finish event . I am trying to access chart.getModel().getComponent(‘grid’)
  3. So while running the application we are getting below issue

Property ‘getModel’ is private and only accessible within class ‘ECharts’.

Current Behavior

It is working as expected but need to make the getModel function as public

Expected Behavior

It is working as expected but need to make the getModel function as public

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

If any workaround is there to get the component other than getModel function

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
pissangcommented, Feb 9, 2022

getModel is not ready to be public yet because it will expose too much internal abstraction. We only suggest using this method when it’s the only workaround to solve the issue and you can accept the missing doc and potential breaking change of this method in the future.

1reaction
Oviliacommented, Dec 1, 2022

You should listen to datazoom event.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to access objects in Typescript - Stack Overflow
If the code is structured as shown above i.e. the sqlConnector variable is defined in the Typescript class, it throws the error. If...
Read more >
get Model from sequelize.models[name: string] #81 - GitHub
I just tried to add this to the function getModel but I can't get the types of the selected model. public getModel<T>(modelName: string) ......
Read more >
Understanding and using interfaces in TypeScript
How to use interfaces with classes. So far, we've learned how a function implements an interface. Now let's build a class for the...
Read more >
Backbone.js
Backbone is an open-source component of DocumentCloud. ... If the model has a validate method, and validation fails, the model will not be...
Read more >
Get data from a server - Angular
This function is configured with both the name of the operation that failed and a safe return value. src/app/hero.service.ts content_copy /** * Handle...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found