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 2020/11/24 05:36:07 UTC

[GitHub] [incubator-echarts] rrekapalli commented on issue #13651: Issue with multi-year heatmap with calendar coordinates not working

rrekapalli commented on issue #13651:
URL: https://github.com/apache/incubator-echarts/issues/13651#issuecomment-732665029


   Hi Ovilia,
   
   Thank you for the revert.  Please see an example with some sample data here:  [https://codepen.io/rrekapalli/pen/gOMVZVZ](url).
   
   Here is the code for a quick reference.
   
   `
   var rowData = [
       ["2014-12-19", 2014, 11753723],
       ["2018-05-23", 2018, 2557159],
       ["2015-05-23", 2015, 2105814],
       ["2016-03-23", 2016, 1648314],
       ["2016-10-27", 2016, 1645524],
       ["2017-03-23", 2017, 1573762],
       ["2016-06-23", 2016, 1479157],
       ["2018-06-16", 2018, 1467920],
       ["2014-11-25", 2014, 1395012],
       ["2015-07-23", 2015, 1370908],
       ["2016-12-23", 2016, 1049359],
       ["2016-08-25", 2016, 973966],
       ["2017-05-23", 2017, 962603],
       ["2015-12-23", 2015, 956216],
       ["2016-01-23", 2016, 801474],
       ["2014-08-20", 2014, 565954],
       ["2015-04-24", 2015, 532695],
       ["2012-11-15", 2012, 529606],
       ["2020-01-16", 2020, 503030],
       ["2014-12-25", 2014, 500268],
       ["2015-09-25", 2015, 486227],
       ["2018-03-16", 2018, 456695],
       ["2015-11-13", 2015, 425852],
       ["2015-09-24", 2015, 410911],
       ["2017-06-23", 2017, 396467],
       ["2014-09-25", 2014, 313791],
       ["2013-05-14", 2013, 300344],
       ["2018-12-20", 2018, 203849],
       ["2014-10-25", 2014, 175013],
       ["2017-05-20", 2017, 165468],
       ["2016-04-23", 2016, 150123],
       ["2018-01-20", 2018, 114159],
       ["2017-12-20", 2017, 86247],
       ["2018-06-20", 2018, 70774],
       ["2015-01-24", 2015, 69532],
       ["2017-03-25", 2017, 66767],
       ["2017-02-25", 2017, 60636],
       ["2014-08-27", 2014, 59655],
       ["2015-12-24", 2015, 52570],
       ["2016-03-25", 2016, 52169],
       ["2018-03-20", 2018, 51652],
       ["2016-06-25", 2016, 46485],
       ["2017-01-25", 2017, 41882],
       ["2012-11-14", 2012, 41224],
       ["2014-10-24", 2014, 38233],
       ["2015-10-28", 2015, 34142],
       ["2015-03-24", 2015, 32990],
       ["2013-11-22", 2013, 28118],
       ["2017-08-30", 2017, 25490],
       ["2015-06-25", 2015, 24656],
       ["2019-12-11", 2019, 22961],
       ["2016-05-25", 2016, 22265],
       ["2013-01-30", 2013, 20512],
       ["2014-09-24", 2014, 20119],
       ["2016-10-25", 2016, 17842],
       ["2017-11-30", 2017, 11204],
       ["2014-07-24", 2014, 11132],
       ["2014-06-24", 2014, 11012],
       ["2012-04-26", 2012, 10173],
       ["2016-11-23", 2016, 9275],
       ["2014-12-17", 2014, 6636],
       ["2013-09-24", 2013, 5237],
       ["2017-06-30", 2017, 3262],
       ["2017-09-30", 2017, 3249],
       ["2015-07-25", 2015, 2917],
       ["2018-01-31", 2018, 2230],
       ["2018-05-31", 2018, 2120],
       ["2014-05-23", 2014, 1577],
       ["2017-03-24", 2017, 1288]
   ];
   
   option = {
       id: 1,
       tooltip: {},
       visualMap: [
           {
               min: '2012',
               max: '2020',
               type: 'piecewise',
               orient: 'horizontal',
               left: 'right',
               top: 35,
               textStyle: {
                   color: '#000'
               },
               label: {
                   formatter: function(s) {
                       return (new Date(s)).getFullYear();
                   }
               },
               dimension: '1',
               categories: ['2012', '2013', '2014', '2015', '2016', '2017', '2018', '2019', '2020']
           }
       ],
       calendar: {
           top: 85,
           left: 70,
           right: 60,
           cellSize: ['auto', '20'],
           range: ['2012', '2013', '2014', '2015', '2016', '2017', '2018', '2019', '2020'],
           itemStyle: {
               borderWidth: 0.5
           },
           yearLabel: {
               show: false
           }
       },
       series: [{
           type: "heatmap",
           coordinateSystem: "calendar",
           data: rowData
       }],
   };
   
   `
   
   Thanks,
   rrekapali


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