DavidMarquezF opened a new issue, #17470:
URL: https://github.com/apache/echarts/issues/17470

   ### What problem does this feature solve?
   
   Right now there is no way to set the markline from the dataset with encode. 
It could prove very useful to do so, since this way updating the dataset would 
affect the whole chart. Imagine if the target is the avg/min/max of a value 
that is not displayed in the chart; using the current `valueIndex` and 
`valueDim` it is not achievable.
   
   I believe the intention of the dataset is to be able to just have the data 
or content that the chart needs to display and the rest of the ECharts object 
is used to show that data. In my opinion, markline, markpoints, etc. are also 
really important pieces of data that should be specified through the dataset. 
   
   ### My use case 
   This is happening to me in a chart that I want to calculate the average of a 
ratio: I have a bar chart displaying the for each bar a ratio calculated like 
`A/B`. The markline needs to show the average, but it is not the same to do 
`(A0/B0+A1/B1)/2` (the current behavior when markline set to "avg") than  
(A0+A1)/(B0+B1). I want to show the latter value, but I can't by only updating 
the dataset; I need to update the series object, etc. Being able to specify 
this value in the dataset would simplify the process. 
   
   
   ### What does the proposed API look like?
   
   Inside markline add the encode option. The property data and property encode 
would be mutually exclusive like it is now for the series encode and data.
   
   ```ts
   markLine: {
          encode: [{
              type: "avg" | "min" | "max",
              dim: string | number
          }]
   }
   ```


-- 
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-unsubscr...@echarts.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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

Reply via email to