Comments (3)
@hantongyou It seems you are not using English, I've helped translate the content automatically. To make your issue understood by more people and get helped, we'd like to suggest using English next time. 🤗
TRANSLATED
TITLE
[Bug] Treemap sets node border color, thickness, etc. based on node properties
BODY
Version
5.4.3
Link to Minimal Reproduction
https://echarts.apache.org/examples/zh/editor.html?c=tree-vertical
Steps to Reproduce
- I use custom data, but the data format is the same as the data structure of the official website example;
- For each of these data items, I set a property to customize the node border style, by setting the following itemStyle configuration item:
...
itemStyle: {
borderColor: function(params){
if(params.data.value>10)
return "red";
else return "green";
}
}
...
- After I tried to print params, but nothing was printed, and if I returned "red" directly in borderColor, I didn't succeed in modifying the style, why?
Current Behavior
When rendering a treemap node, the custom modification of the node border style is invalid
Expected Behavior
You can customize the node border style based on the node property values
Environment
- OS:windows 11
- Browser:Chrome 122.0.6261.70
- Framework:React@18.2
Any additional comments?
No response
from echarts.
API says tree.itemStyle.borderColor can be set to a value, not to a function.
See #19606 for customizing trees.
from echarts.
API says tree.itemStyle.borderColor can be set to a value, not to a function. See #19606 for customizing trees.
Thanks, but according to the demo, it can only customizing tree labels but not the nodes' border or nodes color?
from echarts.
Related Issues (20)
- [Bug] 在rich配置中 图片跟文字没有层级关系吗? HOT 1
- [Bug] When rich is used in the legend of a pie chart, some styles will not take effect. HOT 1
- [Feature] 1111
- [Feature] 基于appendData可以海量增量更新数据,目前还需要海量覆盖更新数据 HOT 1
- [Bug] Stacked bar graph with overlapping bar breaks when having only 2 data points HOT 4
- [Bug] 手机端 使用ecahrts contextmenu 点击事件无法获取 HOT 3
- [question] 折线图的起始位置如何做偏移 HOT 1
- 图表tooltip联动的bug HOT 1
- [Feature] built-in and direct support of error bar
- [Bug] Chart affected by other chart options HOT 4
- [Bug] type custom 绘制矩形,数据量大时缩放时会出现颜色变淡,甚至没有颜色的情况 HOT 2
- [Bug] How to display details about objects which are behind the clicked/hovered object. HOT 2
- 手机端H5 使用echarts,我需要点击折线图或柱状图的时候获取seriesName,可是试了好多方法获取不到,涉及到多系列柱状图和折线图 HOT 1
- [Bug] Gauge progress 'auto' color not reflected when using SVG renderer
- [Bug] Brush unable to detect exact selected value in Funnel, Radar & Gauge HOT 2
- [Bug] Unable to set multiple legend rows, when legend type is scroll. HOT 2
- [Support] Multiples X-Axis HOT 5
- is there possible to enable decal pattern on mouse hover HOT 1
- [Bug] Tooltip Formatter - Map chart - data parameter is undefined.... HOT 1
- Bar chart adds extra space outside of timerange
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from echarts.