You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2022/06/06 09:24:23 UTC
[GitHub] [echarts] fuzi1996 commented on issue #17157: [Feature] how to know which components are used by echarts
fuzi1996 commented on issue #17157:
URL: https://github.com/apache/echarts/issues/17157#issuecomment-1147245054
I got a solution to know is chart used by `use` api?
```javascript
let ECHARTS_COMPONENT_MODEL = null
let ECHARTS_COMPONENT_VIEW = null
let ECHARTS_SERIES_MODEL = null
let ECHARTS_CHART_VIEW = null
const fakeComponent = {
install (extensionRegisters) {
const {
ComponentModel,
ComponentView,
SeriesModel,
ChartView
} = extensionRegisters
ECHARTS_COMPONENT_MODEL = ComponentModel
ECHARTS_COMPONENT_VIEW = ComponentView
ECHARTS_SERIES_MODEL = SeriesModel
ECHARTS_CHART_VIEW = ChartView
}
}
// BarChart
ECHARTS_COMPONENT_MODEL.getClass('series','bar')
// LineChart
ECHARTS_COMPONENT_MODEL.getClass('series','line')
// PieChart
ECHARTS_COMPONENT_MODEL.getClass('series','pie')
// MapChart
ECHARTS_COMPONENT_MODEL.getClass('series','map')
// RadarChart
ECHARTS_COMPONENT_MODEL.getClass('series','radar')
// ScatterChart
ECHARTS_COMPONENT_MODEL.getClass('series','scatter')
// EffectScatterChart
ECHARTS_COMPONENT_MODEL.getClass('series','effectScatter')
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org