You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by "ShaoGongBra (via GitHub)" <gi...@apache.org> on 2023/06/07 14:13:00 UTC

[GitHub] [echarts] ShaoGongBra opened a new issue, #18727: [Bug] 按需加载组件的时候没有渲染任何内容,canvas上一片空白,只有全部导入的时候才正常显示

ShaoGongBra opened a new issue, #18727:
URL: https://github.com/apache/echarts/issues/18727

   ### Version
   
   5.4.2
   
   ### Link to Minimal Reproduction
   
   暂无
   
   ### Steps to Reproduce
   
   我把所有组件都内需导入了,还是不行
   
   ### Current Behavior
   
   不显示内容
   
   ### Expected Behavior
   
   显示内容
   
   ### Environment
   
   ```markdown
   - OS: winows 或者 mac都一样
   - Browser: 都一样
   - Framework: Taro react@18
   ```
   
   
   ### Any additional comments?
   
   _No response_


-- 
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.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


[GitHub] [echarts] ShaoGongBra commented on issue #18727: [Bug] 按需加载组件的时候没有渲染任何内容,canvas上一片空白,只有全部导入的时候才正常显示

Posted by "ShaoGongBra (via GitHub)" <gi...@apache.org>.
ShaoGongBra commented on issue #18727:
URL: https://github.com/apache/echarts/issues/18727#issuecomment-1580915178

   我参照入口文件导入了所有内容,都不能渲染
   
   ```jsx
   import * as echarts from 'echarts/core'
   
   import { CanvasRenderer, SVGRenderer } from 'echarts/renderers';
   import {
     LineChart, BarChart, PieChart, ScatterChart, RadarChart, MapChart, TreeChart, TreemapChart, GraphChart, GaugeChart, FunnelChart, ParallelChart, SankeyChart, BoxplotChart, CandlestickChart, EffectScatterChart, LinesChart, HeatmapChart, PictorialBarChart, ThemeRiverChart, SunburstChart, CustomChart
   } from 'echarts/charts'
   
   import {
     GridComponent, PolarComponent, GeoComponent, SingleAxisComponent, ParallelComponent, CalendarComponent, GraphicComponent, ToolboxComponent, TooltipComponent, AxisPointerComponent, BrushComponent, TitleComponent, TimelineComponent, MarkPointComponent, MarkLineComponent, MarkAreaComponent, LegendComponent, DataZoomComponent, DataZoomInsideComponent, DataZoomSliderComponent, VisualMapComponent, VisualMapContinuousComponent, VisualMapPiecewiseComponent, AriaComponent, DatasetComponent, TransformComponent
   } from 'echarts/components'
   
   import { UniversalTransition, LabelLayout } from 'echarts/features'
   
   const use = echarts.use
   
   // Render engines
   // -----------------
   // Render via Canvas.
   // echarts.init(dom, null, { renderer: 'canvas' })
   
   use([CanvasRenderer]); // Render via SVG.
   // echarts.init(dom, null, { renderer: 'svg' })
   
   use([SVGRenderer]); // ----------------
   // Charts (series)
   // ----------------
   // All of the series types, for example:
   // chart.setOption({
   //     series: [{
   //         type: 'line' // or 'bar', 'pie', ...
   //     }]
   // });
   
   use([LineChart, BarChart, PieChart, ScatterChart, RadarChart, MapChart, TreeChart, TreemapChart, GraphChart, GaugeChart, FunnelChart, ParallelChart, SankeyChart, BoxplotChart, CandlestickChart, EffectScatterChart, LinesChart, HeatmapChart, PictorialBarChart, ThemeRiverChart, SunburstChart, CustomChart]); // -------------------
   // Coordinate systems
   // -------------------
   // All of the axis modules have been included in the
   // coordinate system module below, do not need to
   // make extra import.
   // `cartesian` coordinate system. For some historical
   // reasons, it is named as grid, for example:
   // chart.setOption({
   //     grid: {...},
   //     xAxis: {...},
   //     yAxis: {...},
   //     series: [{...}]
   // });
   
   use(GridComponent); // `polar` coordinate system, for example:
   // chart.setOption({
   //     polar: {...},
   //     radiusAxis: {...},
   //     angleAxis: {...},
   //     series: [{
   //         coordinateSystem: 'polar'
   //     }]
   // });
   
   use(PolarComponent); // `geo` coordinate system, for example:
   // chart.setOption({
   //     geo: {...},
   //     series: [{
   //         coordinateSystem: 'geo'
   //     }]
   // });
   
   use(GeoComponent); // `singleAxis` coordinate system (notice, it is a coordinate system
   // with only one axis, work for chart like theme river), for example:
   // chart.setOption({
   //     singleAxis: {...}
   //     series: [{type: 'themeRiver', ...}]
   // });
   
   use(SingleAxisComponent); // `parallel` coordinate system, only work for parallel series, for example:
   // chart.setOption({
   //     parallel: {...},
   //     parallelAxis: [{...}, ...],
   //     series: [{
   //         type: 'parallel'
   //     }]
   // });
   
   use(ParallelComponent); // `calendar` coordinate system. for example,
   // chart.setOptionp({
   //     calendar: {...},
   //     series: [{
   //         coordinateSystem: 'calendar'
   //     }]
   // );
   
   use(CalendarComponent); // ------------------
   // Other components
   // ------------------
   // `graphic` component, for example:
   // chart.setOption({
   //     graphic: {...}
   // });
   
   use(GraphicComponent); // `toolbox` component, for example:
   // chart.setOption({
   //     toolbox: {...}
   // });
   
   use(ToolboxComponent); // `tooltip` component, for example:
   // chart.setOption({
   //     tooltip: {...}
   // });
   
   use(TooltipComponent); // `axisPointer` component, for example:
   // chart.setOption({
   //     tooltip: {axisPointer: {...}, ...}
   // });
   // Or
   // chart.setOption({
   //     axisPointer: {...}
   // });
   
   use(AxisPointerComponent); // `brush` component, for example:
   // chart.setOption({
   //     brush: {...}
   // });
   // Or
   // chart.setOption({
   //     tooltip: {feature: {brush: {...}}
   // })
   
   use(BrushComponent); // `title` component, for example:
   // chart.setOption({
   //     title: {...}
   // });
   
   use(TitleComponent); // `timeline` component, for example:
   // chart.setOption({
   //     timeline: {...}
   // });
   
   use(TimelineComponent); // `markPoint` component, for example:
   // chart.setOption({
   //     series: [{markPoint: {...}}]
   // });
   
   use(MarkPointComponent); // `markLine` component, for example:
   // chart.setOption({
   //     series: [{markLine: {...}}]
   // });
   
   use(MarkLineComponent); // `markArea` component, for example:
   // chart.setOption({
   //     series: [{markArea: {...}}]
   // });
   
   use(MarkAreaComponent); // `legend` component not scrollable. for example:
   // chart.setOption({
   //     legend: {...}
   // });
   
   use(LegendComponent); // `dataZoom` component including both `dataZoomInside` and `dataZoomSlider`.
   
   use(DataZoomComponent); // `dataZoom` component providing drag, pinch, wheel behaviors
   // inside coodinate system, for example:
   // chart.setOption({
   //     dataZoom: {type: 'inside'}
   // });
   
   use(DataZoomInsideComponent); // `dataZoom` component providing a slider bar, for example:
   // chart.setOption({
   //     dataZoom: {type: 'slider'}
   // });
   
   use(DataZoomSliderComponent); // `visualMap` component including both `visualMapContinuous` and `visualMapPiecewise`.
   
   use(VisualMapComponent); // `visualMap` component providing continuous bar, for example:
   // chart.setOption({
   //     visualMap: {type: 'continuous'}
   // });
   
   use(VisualMapContinuousComponent); // `visualMap` component providing pieces bar, for example:
   // chart.setOption({
   //     visualMap: {type: 'piecewise'}
   // });
   
   use(VisualMapPiecewiseComponent); // `aria` component providing aria, for example:
   // chart.setOption({
   //     aria: {...}
   // });
   
   use(AriaComponent); // dataset transform
   // chart.setOption({
   //     dataset: {
   //          transform: []
   //     }
   // });
   
   use(TransformComponent);
   use(DatasetComponent); // universal transition
   // chart.setOption({
   //     series: {
   //         universalTransition: { enabled: true }
   //     }
   // })
   
   use(UniversalTransition); // label layout
   // chart.setOption({
   //     series: {
   //         labelLayout: { hideOverlap: true }
   //     }
   // })
   
   use(LabelLayout);
   
   ```


-- 
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


[GitHub] [echarts] ShaoGongBra commented on issue #18727: [Bug] 按需加载组件的时候没有渲染任何内容,canvas上一片空白,只有全部导入的时候才正常显示

Posted by "ShaoGongBra (via GitHub)" <gi...@apache.org>.
ShaoGongBra commented on issue #18727:
URL: https://github.com/apache/echarts/issues/18727#issuecomment-1581756676

   奇怪了,我昨晚在windows上搞了一个晚上都有问题,今天上班在mac系统上居然又好了


-- 
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


[GitHub] [echarts] echarts-bot[bot] commented on issue #18727: [Bug] 按需加载组件的时候没有渲染任何内容,canvas上一片空白,只有全部导入的时候才正常显示

Posted by "echarts-bot[bot] (via GitHub)" <gi...@apache.org>.
echarts-bot[bot] commented on issue #18727:
URL: https://github.com/apache/echarts/issues/18727#issuecomment-1581083282

   @ShaoGongBra Please provide a demo for the issue either with [Official Editor](https://echarts.apache.org/examples/editor.html), [CodePen](https://codepen.io/Ovilia/pen/dyYWXWM), [CodeSandbox](https://codesandbox.io/s/echarts-basic-example-template-mpfz1s) or [JSFiddle](https://jsfiddle.net/plainheart/e46ozpqj/7/).


-- 
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


[GitHub] [echarts] ShaoGongBra closed issue #18727: [Bug] 按需加载组件的时候没有渲染任何内容,canvas上一片空白,只有全部导入的时候才正常显示

Posted by "ShaoGongBra (via GitHub)" <gi...@apache.org>.
ShaoGongBra closed issue #18727: [Bug] 按需加载组件的时候没有渲染任何内容,canvas上一片空白,只有全部导入的时候才正常显示
URL: https://github.com/apache/echarts/issues/18727


-- 
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


[GitHub] [echarts] ShaoGongBra commented on issue #18727: [Bug] 按需加载组件的时候没有渲染任何内容,canvas上一片空白,只有全部导入的时候才正常显示

Posted by "ShaoGongBra (via GitHub)" <gi...@apache.org>.
ShaoGongBra commented on issue #18727:
URL: https://github.com/apache/echarts/issues/18727#issuecomment-1580909406

   ```jsx
   import * as echarts from 'echarts'
   ```
   只有这样导入,才能只能是出来


-- 
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


[GitHub] [echarts] echarts-bot[bot] commented on issue #18727: [Bug] 按需加载组件的时候没有渲染任何内容,canvas上一片空白,只有全部导入的时候才正常显示

Posted by "echarts-bot[bot] (via GitHub)" <gi...@apache.org>.
echarts-bot[bot] commented on issue #18727:
URL: https://github.com/apache/echarts/issues/18727#issuecomment-1580907838

   @ShaoGongBra It seems you are not using English, I've helped translate the content automatically. To make your issue understood by more people and get helped, we'd like to suggest using English next time. 🤗
   <details><summary><b>TRANSLATED</b></summary><br>
   
   **TITLE**
   
   [Bug] When loading components on demand, nothing is rendered, the canvas is blank, and it only displays normally when all imported
   
   **BODY**
   
   ### Version
   
   5.4.2
   
   ### Link to Minimal Reproduction
   
   no yet
   
   ### Steps to Reproduce
   
   I have imported all the components, but it still doesn't work
   
   ### Current Behavior
   
   do not display content
   
   ### Expected Behavior
   
   Display content
   
   ### Environment
   
   ```markdown
   - OS: winows or mac is the same
   - Browser: all the same
   - Framework: Taro react@18
   ```
   
   
   ### Any additional comments?
   
   _No response_
   </details>


-- 
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