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/04/02 20:00:15 UTC

[GitHub] [incubator-echarts] 100pah commented on issue #12366: visualMap on time series incorrect line color

100pah commented on issue #12366: visualMap on time series incorrect line color
URL: https://github.com/apache/incubator-echarts/issues/12366#issuecomment-608073043
 
 
   This option works.
   
   ```js
   option = {
       xAxis: { type: 'time' },
       yAxis: { type: 'value' },
       visualMap: {
           type: 'piecewise',
           show: false,
           dimension: 0,
           pieces: [{
               gt: +new Date('2020-04-01T00:00'),
               lte: +new Date('2020-04-01T01:00'),
               color: 'blue'
           }, {
               gt: +new Date('2020-04-01T01:00'),
               lte: +new Date('2020-04-01T04:00'),
               color: 'red'
           }]
       },
       tooltip:{ trigger: "axis" },
       series: [{
           type: 'line',
           data: [
               ['2020-04-01T00:00', 200],
               ['2020-04-01T01:00', 400],
               ['2020-04-01T02:00', 650],
               ['2020-04-01T03:00', 500]
           ]
       }]
   };
   ```
   
   But notice each piece should both contain `lt`/`lte`  and `gt`/`gte`.
   (this should be enhanced)
   

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org