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 2022/02/09 10:15:32 UTC

[GitHub] [echarts] RavalikaP commented on issue #16482: Regression lines for Line Chart

RavalikaP commented on issue #16482:
URL: https://github.com/apache/echarts/issues/16482#issuecomment-1033593638


   Here is the sample options structure
   
   echarts.registerTransform(ecStat.transform.regression);
   const data = [
     { name: 'Mon', value: 150 },
     { name: 'Tue', value: 230 },
     { name: 'Wed', value: 224 },
     { name: 'Thu', value: 218 },
     { name: 'Fri', value: 135 },
     { name: 'Sat', value: 147 },
     { name: 'Sun', value: 260 }
   ];
   option = {
     dataset: [
       {
         source: data
       },
       {
         transform: {
           type: 'ecStat:regression'
         }
       }
     ],
     xAxis: {
       type: 'category'
     },
     yAxis: {
       type: 'value'
     },
     series: [
       {
         type: 'scatter'
       },
       {
         name: 'line',
         type: 'line',
         datasetIndex: 1,
         symbolSize: 0.1,
         symbol: 'circle',
         label: { show: true, fontSize: 16 },
         labelLayout: { dx: -20 },
         encode: { label: 2, tooltip: 1 }
       }
     ]
   };
   
   


-- 
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: commits-unsubscribe@echarts.apache.org

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