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 2021/04/23 08:53:27 UTC

[GitHub] [echarts] zhoufanglu opened a new issue #14771: 关于仪表formatter为html的问题

zhoufanglu opened a new issue #14771:
URL: https://github.com/apache/echarts/issues/14771


   ### Version
   4.9.0
   
   ### Steps to reproduce
   ```js
   detail:{
   
     formatter: function (params) {
           return `
             <div>${params}</div>
           `
   
         },
   }
   
   ```
   
   ### What is expected?
   期望解析字符串html
   
   ### What is actually happening?
   结果没有解析
   ![$)NNEU@%X9QWP%MWH~OFBRS](https://user-images.githubusercontent.com/24451091/115846279-50847c00-a454-11eb-80d0-69f98230e48e.png)
   
   
   <!-- This issue is generated by echarts-issue-helper. DO NOT REMOVE -->
   


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


[GitHub] [echarts] zhoufanglu commented on issue #14771: 关于仪表formatter为html的问题

Posted by GitBox <gi...@apache.org>.
zhoufanglu commented on issue #14771:
URL: https://github.com/apache/echarts/issues/14771#issuecomment-826184915


   > 把图表高度设小一点,图表的高度可能是 CSS 容器高度或初始化图表的时候传入的
   
   高度我设的都是100%,请问有类似grid的解决方式吗


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


[GitHub] [echarts] zhoufanglu commented on issue #14771: 关于仪表formatter为html的问题

Posted by GitBox <gi...@apache.org>.
zhoufanglu commented on issue #14771:
URL: https://github.com/apache/echarts/issues/14771#issuecomment-825509358


   还有 我想问下,仪表盘与边框的边距怎么调整? 使用`grid`无效


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


[GitHub] [echarts] zhoufanglu commented on issue #14771: 关于仪表formatter为html的问题

Posted by GitBox <gi...@apache.org>.
zhoufanglu commented on issue #14771:
URL: https://github.com/apache/echarts/issues/14771#issuecomment-826261793


   解决了,这不是边距的问题。 = -
   需要配置radius属性就能改变大小了
   ```js
   type: 'gauge',
   radius: '80%', //此属性调仪表盘大小。。
   ```


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


[GitHub] [echarts] Ovilia commented on issue #14771: 关于仪表formatter为html的问题

Posted by GitBox <gi...@apache.org>.
Ovilia commented on issue #14771:
URL: https://github.com/apache/echarts/issues/14771#issuecomment-825541621


   把图表高度设小一点,图表的高度可能是 CSS 容器高度或初始化图表的时候传入的


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


[GitHub] [echarts] zhoufanglu commented on issue #14771: 关于仪表formatter为html的问题

Posted by GitBox <gi...@apache.org>.
zhoufanglu commented on issue #14771:
URL: https://github.com/apache/echarts/issues/14771#issuecomment-826184915






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


[GitHub] [echarts] zhoufanglu closed issue #14771: 关于仪表formatter为html的问题

Posted by GitBox <gi...@apache.org>.
zhoufanglu closed issue #14771:
URL: https://github.com/apache/echarts/issues/14771


   


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


[GitHub] [echarts] zhoufanglu closed issue #14771: 关于仪表formatter为html的问题

Posted by GitBox <gi...@apache.org>.
zhoufanglu closed issue #14771:
URL: https://github.com/apache/echarts/issues/14771


   


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


[GitHub] [echarts] zhoufanglu commented on issue #14771: 关于仪表formatter为html的问题

Posted by GitBox <gi...@apache.org>.
zhoufanglu commented on issue #14771:
URL: https://github.com/apache/echarts/issues/14771#issuecomment-825516668


   > 不支持 html,可以用富文本。
   > 位置是通过 [center](https://echarts.apache.org/zh/option.html#series-gauge.center) 控制的。
   
   谢谢你的回答,我不是问你位置,我想知道内边距如何去除. 富文本我去看看
   ![image](https://user-images.githubusercontent.com/24451091/115848126-20d67380-a456-11eb-9fa3-9a4ffcc54fd4.png)
   


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


[GitHub] [echarts] echarts-bot[bot] commented on issue #14771: 关于仪表formatter为html的问题

Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on issue #14771:
URL: https://github.com/apache/echarts/issues/14771#issuecomment-825508920






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


[GitHub] [echarts] Ovilia commented on issue #14771: 关于仪表formatter为html的问题

Posted by GitBox <gi...@apache.org>.
Ovilia commented on issue #14771:
URL: https://github.com/apache/echarts/issues/14771#issuecomment-825513661


   不支持 html,可以用富文本。
   位置是通过 [center](https://echarts.apache.org/zh/option.html#series-gauge.center) 控制的。


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


[GitHub] [echarts] zhoufanglu commented on issue #14771: 关于仪表formatter为html的问题

Posted by GitBox <gi...@apache.org>.
zhoufanglu commented on issue #14771:
URL: https://github.com/apache/echarts/issues/14771#issuecomment-825525735


   formatter的问题解决了
   ```js
   //变量
   let companyScore = 40
   let companyLevel = '优'
   //富文本rich使用
   formatter: [
     `{a|`+companyScore+`}`,
     `{b|`+companyLevel+`}`,
   ].join('\n'),
   rich: {
     a: {
       color: 'red',
       lineHeight: 10
     },
     b: {
       color: 'green',
       fontSize: 32
     },
   },
   
   ```
   


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