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

   ### Version
   
   5.4.1
   
   ### Link to Minimal Reproduction
   
   _No response_
   
   ### Steps to Reproduce
   
   useEffect(() => {
     const dom = document.getElementById("container")!;
     const myChart = echarts.init(dom, undefined, {
       renderer: "canvas",
       useDirtyRect: false,
     });
   
     const heatPoints: any[] = [];
   
     fetch("http://127.0.0.1:9999/query";)
       .then((res) => res.json())
       .then(({ data }) => {
         for (let point of data)
           heatPoints.push([point.lng, point.lat, point.heat]);
         myChart.setOption({
           animation: false,
           bmap: {
             center: [120.13066322374, 30.240018034923],
             zoom: 14,
             roam: true,
           },
           visualMap: {
             show: false,
             top: "top",
             min: 0,
             max: 5,
             seriesIndex: 0,
             calculable: true,
             inRange: {
               color: ["blue", "blue", "green", "yellow", "red"],
             },
           },
           series: [
             {
               type: "heatmap",
               coordinateSystem: "bmap",
               data: heatPoints,
               pointSize: 5,
               blurSize: 6,
             },
           ],
         });
        // [Bug] 属性“getModel”为私有属性,只能在类“ECharts”中访问。ts(2341)
         const bmap = myChart.**getModel**().getComponent("bmap").getBMap();
       });
   }, []);
   
   ### Current Behavior
   
   按照下面官网的这个例子,使用TS+React复现的时候,TS提示getModel是private方法
   
https://echarts.apache.org/examples/zh/editor.html?c=heatmap-bmap&version=5.4.1
   
   ### Expected Behavior
   
   getModel应该能够在myChart上使用
   
   ### Environment
   
   _No response_
   
   ### 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to