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/09/15 09:09:38 UTC

[GitHub] [incubator-echarts] narayn92 edited a comment on issue #13269: Style MarkLine label background

narayn92 edited a comment on issue #13269:
URL: https://github.com/apache/incubator-echarts/issues/13269#issuecomment-692580788


   @Bilge The above problem can be solved using the existing label properties which are not listed in the official documentation.
   You can see these properties in the source code. Attached screenshot for your reference.
   
   ![image](https://user-images.githubusercontent.com/7525732/93190181-abd4ea00-f760-11ea-9d1f-db8fe20ff238.png)
   
   
   **Sample chart option:**
   var option = {
       xAxis: {
           data: ['A', 'B', 'C', 'D', 'E'],
       },
       yAxis: {},
       series: [{
           name: 'line',
           type: 'line',
           data: [1, 2, 3, 4, 5],
           markLine: {
               data: [{
               name: 'My label',
                   xAxis: 'D',
                   label: {
                       formatter: '{b}',
                       position: 'insideMiddleTop',
                       
                       color: '#fff',
                       textBorderColor: '#000',
                       textBorderWidth: 2,
                       
                       fontStyle: 'italic',
                       fontWeight: 'bold',
                       fontSize: 50,
                       fontFamily: 'Helvetica',
                       
                       // lineHeight: 25,
                       // width: 200,
                       // height: 200,
                       // tag: 'asdasdasdasdasd',
                       
                       backgroundColor: '#ff0000',
                       padding: 25,
                       borderColor: '#000',
                       borderWidth: 2,
                       borderRadius: 5,
                       
                       shadowColor: '#333333',
                       shadowBlur: 5,
                       shadowOffsetX: 5,
                       shadowOffsetY: 5,
                       
                       textShadowColor: '#0000ff',
                       textShadowBlur: 5,
                       textShadowOffsetX: 5,
                       textShadowOffsetY: 5,
                       
                   }
               }]
           }
       }]
   };
   


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



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