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 2021/05/10 07:11:24 UTC

[GitHub] [echarts] hujinbo opened a new issue #14904: Echarts5 heatmap use dataset doesn't work

hujinbo opened a new issue #14904:
URL: https://github.com/apache/echarts/issues/14904


   ### Version
   5.1.1
   
   ### Reproduction link
   [https://www.makeapie.com/editor.html?c=x7vS-g2fEU](https://www.makeapie.com/editor.html?c=x7vS-g2fEU)
   
   ### Steps to reproduce
   Use the following option to render the chart.
   ```
   $.get('https://hujinbo.oss-cn-shenzhen.aliyuncs.com/tmp/china.json', function (geoJson) {
       echarts.registerMap('china', geoJson);
   
       myChart.setOption({
           mapSelect: {
               areaCode: [],
               granularity: 'country',
           },
           geo: [
               {
                   map: 'china',
                   roam: true,
                   label: {
                       show: true,
                       color: '#555555',
                   },
                   itemStyle: {
                       areaColor: '#e6e8ea',
                       borderColor: '#fff',
                   },
                   emphasis: {
                       label: {
                           show: true,
                           color: '#555555',
                       },
                       itemStyle: {
                           areaColor: '#e6e8ea',
                           borderColor: '#fff',
                       },
                   },
               },
           ],
           visualMap: {
               min: 58,
               max: 6300,
               calculable: true,
               splitNumber: 5,
               show: true,
               inRange: {
                   color: ['#0099cc', '#0099ff'],
               },
               type: 'continuous',
               text: null,
           },
           series: {
               map: 'china',
               type: 'heatmap',
               coordinateSystem: 'geo',
               encode: {
                   lng: 1,
                   lat: 2,
                   x: 0,
                   y: 3,
               },
               pointSize: 20,
               blurSize: 20,
           },
           dataset: [
               {
                   dimensions: ['province', 'lng', 'lat', 'l_tmp'],
                   source: [
                       ['province', 'lng', 'lat', 'l_tmp'],
                       ['浙江', 120.153576, 30.287459, 2703],
                       ['西藏', 91.132212, 29.660361, 320],
                       ['北京', 116.405285, 39.904989, 167],
                       ['广西', 108.320004, 22.82402, 4249],
                       ['广东', 113.280637, 23.125178, 6036],
                       ['山西', 112.549248, 37.857014, 1714],
                       ['台湾', 121.509062, 25.044332, 898],
                       ['黑龙江', 126.642464, 45.756967, 501],
                       ['福建', 119.306239, 26.075302, 3033],
                       ['香港', 114.173355, 22.320048, 293],
                       ['河南', 113.665412, 34.757975, 3231],
                       ['青海', 101.778916, 36.623178, 58],
                       ['内蒙古', 111.670801, 40.818311, 594],
                       ['河北', 114.502461, 38.045474, 1757],
                       ['海南', 110.33119, 20.031971, 6204],
                       ['重庆', 106.504962, 29.533155, 212],
                       ['安徽', 117.283042, 31.86119, 3464],
                       ['新疆', 87.617733, 43.792818, 1632],
                       ['澳门', 113.54909, 22.198951, 258],
                       ['湖南', 112.982279, 28.19409, 3044],
                       ['吉林', 125.3245, 43.886841, 507],
                       ['四川', 104.065735, 30.659462, 4338],
                       ['宁夏', 106.278179, 38.46637, 550],
                       ['天津', 117.190182, 39.125596, 280],
                       ['江西', 115.892151, 28.676493, 3110],
                       ['贵州', 106.713478, 26.578343, 955],
                       ['辽宁', 123.429096, 41.796767, 1680],
                       ['江苏', 118.767413, 32.041544, 2834],
                       ['陕西', 108.948024, 34.263161, 1785],
                       ['上海', 121.472644, 31.231706, 220],
                       ['湖北', 114.298572, 30.584355, 2911],
                       ['山东', 117.000923, 36.675807, 3234],
                       ['甘肃', 103.823557, 36.058039, 1444],
                       ['云南', 102.712251, 25.040609, 3352],
                   ],
               },
           ],
       });
   });
   ```
   ![Animation](https://user-images.githubusercontent.com/29507557/117619474-e2ed8500-b1a1-11eb-9d96-478d82903e71.gif)
   
   ### What is expected?
   Use dataset to render normally.
   
   ### What is actually happening?
   Heatmap cannot be displayed normally, and the console reports an error:
   ```
   Uncaught TypeError: Cannot read property 'index' of undefined
       at VM429 echarts.min.js:45
       at Array.map (<anonymous>)
       at O (VM429 echarts.min.js:35)
       at t.each (VM429 echarts.min.js:45)
       at t.mapArray (VM429 echarts.min.js:45)
       at e._renderOnGeo (VM429 echarts.min.js:45)
       at e.render (VM429 echarts.min.js:45)
       at t.progress (VM429 echarts.min.js:45)
       at t._doProgress (VM429 echarts.min.js:45)
       at t.perform (VM429 echarts.min.js:45)
   ```
   
   ---
   Normal use in ecarts4.
   
   <!-- This issue is generated by echarts-issue-helper. DO NOT REMOVE -->
   <!-- This issue is in English. DO NOT REMOVE -->


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

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] plainheart edited a comment on issue #14904: Echarts5 heatmap use dataset doesn't work

Posted by GitBox <gi...@apache.org>.
plainheart edited a comment on issue #14904:
URL: https://github.com/apache/echarts/issues/14904#issuecomment-837064894


   It seems to be working if we only set as follows,
   ```js
   encode: {
       lng: 1,
       lat: 2,
       value: 3
   }
   ```


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

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 #14904: Echarts5 heatmap use dataset doesn't work

Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on issue #14904:
URL: https://github.com/apache/echarts/issues/14904#issuecomment-836277088


   Hi! We've received your issue and please be patient to get responded. 🎉
   The average response time is expected to be within one day for weekdays.
   
   In the meanwhile, please make sure that it contains **a minimum reproducible demo** and necessary **images** to illustrate. Otherwise, our committers will ask you to do so.
   
   *A minimum reproducible demo* should contain as little data and components as possible but can still illustrate your problem. This is the best way for us to reproduce it and solve the problem faster.
   
   You may also check out the [API](http://echarts.apache.org/api.html) and [chart option](http://echarts.apache.org/option.html) to get the answer.
   
   If you don't get helped for a long time (over a week) or have an urgent question to ask, you may also send an email to dev@echarts.apache.org. Please attach the issue link if it's a technical question.
   
   If you are interested in the project, you may also subscribe our [mailing list](https://echarts.apache.org/en/maillist.html).
   
   Have a nice day! 🍵


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

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] plainheart commented on issue #14904: Echarts5 heatmap use dataset doesn't work

Posted by GitBox <gi...@apache.org>.
plainheart commented on issue #14904:
URL: https://github.com/apache/echarts/issues/14904#issuecomment-837064894


   It seems to be working if we only set as follows,
   ```js
   encode: {
       lng: 1,
       lat: 2
   }
   ```


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

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