You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by "KaustubhDTawate (via GitHub)" <gi...@apache.org> on 2024/01/09 09:23:22 UTC
[I] Can ECharts in Mobile App(React Native) support custom tooltips with images, colored text, and styles? [echarts]
KaustubhDTawate opened a new issue, #19486:
URL: https://github.com/apache/echarts/issues/19486
### Version
-
### Link to Minimal Reproduction
-
### Steps to Reproduce
-
### Current Behavior
-
### Expected Behavior
Additionally, I have attached a demo image for reference.

### Environment
```markdown
- OS:
- Browser:
- Framework:
```
### Any additional comments?
_No response_
--
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-unsubscribe@echarts.apache.org.apache.org
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
Re: [I] Can ECharts in Mobile App(React Native) support custom tooltips with images, colored text, and styles? [echarts]
Posted by "XHL-study (via GitHub)" <gi...@apache.org>.
XHL-study commented on issue #19486:
URL: https://github.com/apache/echarts/issues/19486#issuecomment-2556043915
暂时性的解决方案?
https://docs.qq.com/doc/p/4b05780aefa6438832994bba7a6a3c21a4456515
@KaustubhDTawate @AleeFarook
--
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-unsubscribe@echarts.apache.org
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
Re: [I] Can ECharts in Mobile App(React Native) support custom tooltips with images, colored text, and styles? [echarts]
Posted by "KaustubhDTawate (via GitHub)" <gi...@apache.org>.
KaustubhDTawate commented on issue #19486:
URL: https://github.com/apache/echarts/issues/19486#issuecomment-1891421754
I attempted rich text rendering for tooltip formatting, but it doesn't appear to be functioning. I've included a link for a demo to reproduce the issue.Also I have attached demo link of html rendering on android.
Reproducible Snack Demo with rich text: [link](https://snack.expo.dev/d3Oc3GAul?platform=android)
Reproducible Snack Demo with html : [link](https://snack.expo.dev/B7AbBtgPS?platform=android)
--
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-unsubscribe@echarts.apache.org
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
Re: [I] Can ECharts in Mobile App(React Native) support custom tooltips with images, colored text, and styles? [echarts]
Posted by "ythomop (via GitHub)" <gi...@apache.org>.
ythomop commented on issue #19486:
URL: https://github.com/apache/echarts/issues/19486#issuecomment-2681453260
Are there any news on this?
--
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-unsubscribe@echarts.apache.org
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
Re: [I] Can ECharts in Mobile App(React Native) support custom tooltips with images, colored text, and styles? [echarts]
Posted by "MatthiasMert (via GitHub)" <gi...@apache.org>.
MatthiasMert commented on issue #19486:
URL: https://github.com/apache/echarts/issues/19486#issuecomment-1882726905
You can just pass html to the [tooltip formatter funtion](https://echarts.apache.org/en/option.html#tooltip.formatter): [Example](https://echarts.apache.org/examples/en/editor.html?c=line-simple&code=MYewdgzgLgBAlgWwOYwLwwEoHksBUD6ACgIK4ASMA1DAOQD0AJgIZRN1MQQCmUdiSdAO5cWACy4AnOhACuYMAE98ARgBMADgB0ABzBIaAbgBQRkNqhxwaGAG8jMGAA9ijuBABct-w5hQF2rk8aYBYuJBAJBRoAGm8HZlZPAG0aAFlwGNpcGS5MmgB1LgY83FEZPIAxCTg8gGUWOrkaAF1vAF9YhwUXN087H19_QNoANyYAGxyads7fEBBxi20-uJgAMwiEFihJTwYQWqhRWY7vbmquDxgk1f6BmASmZOUAVgAGaJhVAGYPr9UACyfVTKdSfZTfF7ggEAdmBADY3s1ZgM_AEguM4GBcqs2t5Wm1jCY1nJgBYrPtDqIABTaJgSJgICAASi8DgkPBkEjAtAAPAw4CMAHwwXkAIxkUCgVmgCnGXFQACJQOMIp4OQwDIqRRAQAguL4uI5YLy6BKpeAReKJFbtDq9QaEBEDTtjaK6HbRQLhTQqDBVjRefwYBAJMBUL7qMHqDQhdM2kA)
--
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-unsubscribe@echarts.apache.org
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
Re: [I] Can ECharts in Mobile App(React Native) support custom tooltips with images, colored text, and styles? [echarts]
Posted by "MatthiasMert (via GitHub)" <gi...@apache.org>.
MatthiasMert commented on issue #19486:
URL: https://github.com/apache/echarts/issues/19486#issuecomment-1882997102
It would be helpful if you provided an example link. As you can see it is working in the one I provided.
--
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-unsubscribe@echarts.apache.org
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
Re: [I] Can ECharts in Mobile App(React Native) support custom tooltips with images, colored text, and styles? [echarts]
Posted by "KaustubhDTawate (via GitHub)" <gi...@apache.org>.
KaustubhDTawate commented on issue #19486:
URL: https://github.com/apache/echarts/issues/19486#issuecomment-1882838200
I have tried same code inside tooltip formatter, but it returned the content as it is in string. Complete HTML code is getting rendered here.

--
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-unsubscribe@echarts.apache.org
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
Re: [I] Can ECharts in Mobile App(React Native) support custom tooltips with images, colored text, and styles? [echarts]
Posted by "KaustubhDTawate (via GitHub)" <gi...@apache.org>.
KaustubhDTawate commented on issue #19486:
URL: https://github.com/apache/echarts/issues/19486#issuecomment-1884218632
The code from the provided example link works on the web, but when used in a mobile app, the code inside the formatter function (HTML rendering) appears to be unsupported. Any alternative approaches for adapting this code for mobile use?
--
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-unsubscribe@echarts.apache.org
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
Re: [I] Can ECharts in Mobile App(React Native) support custom tooltips with images, colored text, and styles? [echarts]
Posted by "AleeFarook (via GitHub)" <gi...@apache.org>.
AleeFarook commented on issue #19486:
URL: https://github.com/apache/echarts/issues/19486#issuecomment-2503450196
I am facing this issue too, how can i show Image in tooltip ?
```
const option = {
xAxis: {
type: 'category',
name: 'Mileage (KM)',
data: allMileage.map(mileage => `${mileage / 1000}K`), // Convert mileage to K units for KM
},
yAxis: {
type: 'value',
name: 'Price (AED)',
axisLabel: {
formatter: '{value}K',
},
},
tooltip: {
trigger: 'item',
triggerOn: 'click',
renderMode: 'richText',
formatter: function (params) {
console.log('params===', JSON.stringify(params))
if (params.seriesName === 'Other cars' && params.data?.ad_image) {
return ` {image| } <div>{value| Price: ${params.value}K}</div> `;
}
},
// textStyle: {
rich: {
image: {
height: 100, // Set image height
width: 100, // Set image width
align: 'center',
backgroundColor: {
image: 'https://gratisography.com/wp-content/uploads/2024/03/gratisography-vr-glasses-800x525.jpg', // Dynamically set the image URL
},
},
value: {
// fontSize: 14,
// color: '#333',
// align: 'center',
},
},
// },
},
series: updatedSeries,
};
```
--
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-unsubscribe@echarts.apache.org
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