Zacknero commented on issue #10745: How create the timeline with train status 
on travel?
URL: 
https://github.com/apache/incubator-echarts/issues/10745#issuecomment-506682006
 
 
   > ```
   > option = {
   >     timeline: {
   >         data: [
   >             'a', 'b', 'c', 'd'
   >         ],
   >         axisType: 'category',
   >         show: true,
   >         autoPlay: false
   >     }
   > };
   > ```
   
   Thaks you!! But i have last question: how i set the colorStops from 2002 to 
2004?? it's hard with percentage :(
   My code:
   ```
   option = {
       baseOption: {
           timeline: {
               axisType: 'category',
               top: 'auto',
               currentIndex: 2,
                controlStyle: {
                    show: false
                },
               data: [
                   '2002-01-01','2003-01-01','2004-01-01',
                   {
                       value: '2005-01-01',
                       symbol: 'diamond',
                       symbolSize: 16
                   },
                   '2006-01-01', 
'2007-01-01','2008-01-01','2009-01-01','2010-01-01',
                   {
                       value: '2011-01-01',
                       symbol: 'diamond',
                       symbolSize: 18
                   },
               ],
               label: {
                   formatter : function(s) {
                       return (new Date(s)).getFullYear();
                   },
                   position: 'top',
                   rotate: 90,
                   padding: -10
               },
               lineStyle: {
                   color: {
                       type: 'linear',
                       colorStops: [{
                           offset: 0, color: 'green' // color at 0% position
                       }, {
                           offset: 0.1, color: 'grey' // color at 100% position
                       }]
                   }
               }
           }
       }
   };
   ```

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

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

Reply via email to