work933k commented on issue #16610:
URL: https://github.com/apache/echarts/issues/16610#issuecomment-1715775294

   The issue is that the "marker" is implemented using inline styling. I 
implemented a workaround by creating the marker myself in the formatter:
   ```
   formatter: (param: any[]) => {
           const { axisValue } = param[0] || [];
   
           param.forEach(({ seriesName, value, color }) => {
             // create CSP compliant marker
             const marker = `<span class="marker" 
data-color="${color}"></span>`;
             tooltip += `${marker} ${seriesName}: ${value}%<br />`;
           });
   
           return tooltip;
         },
   ```
   And also the colors need to be implemented scss-part:
   ```
   ::ng-deep {
     .marker {
       display: inline-block;
       margin-right: 4px;
       border-radius: 10px;
       width: 10px;
       height: 10px;
   
       &[data-color='#F0CF84'] {
         background-color: #f0cf84;
       }
   
       &[data-color='#B66728'] {
         background-color: #b66728;
       }
   ```


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

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to