[GitHub] [incubator-echarts] plainheart commented on pull request #12673: Fix #12642, add line height for axispointer

2020-05-27 Thread GitBox


plainheart commented on pull request #12673:
URL: 
https://github.com/apache/incubator-echarts/pull/12673#issuecomment-635035457


   Sorry, that's only my suggestions and I thought you would finish it. Now you 
have closed this issue, I have to open a new one for this later. Feel free to 
give some advice on rich label. Thank you!   



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:
us...@infra.apache.org



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



[GitHub] [incubator-echarts] plainheart commented on pull request #12673: Fix #12642, add line height for axispointer

2020-05-27 Thread GitBox


plainheart commented on pull request #12673:
URL: 
https://github.com/apache/incubator-echarts/pull/12673#issuecomment-634829856


   Hi~ @susiwen8 Thanks your fixing.
   I've been inspired by following code lines from @Ovilia ~
   Maybe we can make some changes like this
   
https://github.com/apache/incubator-echarts/blob/5a94212c43f0a4b5a8da7c26cf20192d29fb1d02/src/component/tooltip/TooltipRichContent.js#L139-L147
   
   As mentioned above, there may be no need to solve this issue as present 
scheme.
   ```js
   var textRect = textContain.getBoundingRect(text, font, null, null, null, 
labelModel.get('lineHeight'));
   ```
   
   Some changes are as follows
   ```js
   style: graphic.setTextStyle({}, labelModel, {
   text: text,
   fill: bgColor,
   stroke: labelModel.get('borderColor') || 'transparent',
   lineWidth: labelModel.get('borderWidth') || 0,
   textFont: font,
   textPosition: 'inside',
   textPadding: paddings,
   textFill: labelModel.getTextColor()
   })
   ```
   This can solve the issue that `lineHeight` is invalid and in the meanwhile, 
there are more supported properties of label.(Note that some new supported 
properties are now missing description in the official document)
   ```js
   label: {
   fontWeight: 'bold',
   fontSize: 20,
   textShadowBlur: 10,
   textShadowOffsetX: 10,
   textShadowOffsetY: 10,
   textShadowColor: 'red',
   backgroundColor: 'yellow',
   textBorderColor: 'blue',
   textBorderWidth: 5,
   borderWidth: 2,
   borderColor: 'cyan',
   padding: [10, 20, 30, 40],
   shadowColor: 'green',
   shadowBlur: 5,
   shadowOffsetX: 10,
   shadowOffsetY: 10,
   borderRadius: 20,
   lineHeight: 40,
   color: 'purple',
   // width: 400, // rich is needed, but rich is TODO
   // height: 200, // rich is needed, but rich is TODO
   }
   ```
   A test screenshot(Just for test, No beauty)
   
   
![image](https://user-images.githubusercontent.com/26999792/83052334-bec49100-a081-11ea-9ea7-504e578b1b52.png)
   
   Looks good.
   
   In the last, that's a pity rich label is still a TODO. I have no idea about 
it by now, but I think we can refer to implements of 
[TooltipRichContent](https://github.com/apache/incubator-echarts/blob/5a94212c43f0a4b5a8da7c26cf20192d29fb1d02/src/component/tooltip/TooltipRichContent.js#L74-L108)
 
   
   Let we make it right together~ : )
   



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:
us...@infra.apache.org



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



[GitHub] [incubator-echarts] plainheart commented on pull request #12673: Fix #12642, add line height for axispointer

2020-05-20 Thread GitBox


plainheart commented on pull request #12673:
URL: 
https://github.com/apache/incubator-echarts/pull/12673#issuecomment-631847964


   In fact, I did a test about this a few days ago and the result is that 
besides `lineHeight`, there are more properties are invalid for 
`tooltip.axisPointer.label` such as `width`, `height`,  `textShadowColor`, 
`textBorderColor`, `textBorderWidth`.
   Maybe this PR can fix them in a row.



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:
us...@infra.apache.org



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