amcharts / amcharts5

The newest, fastest, and most advanced amCharts charting library for JavaScript and TypeScript apps.
Other
353 stars 95 forks source link

Hierarchy charts - Tree Map - Data processor will work for one level ? #1660

Closed ArunPragadeeswar007 closed 2 months ago

ArunPragadeeswar007 commented 3 months ago

Bug description

I am using a random color for the treemap, and I expect the tooltip color to pick the alternative color from the background. However, this approach fails because I missed converting the color code to a color object. While I found that a data pre-processor can convert the color code to a color object, it only works for the parent level. I need this functionality to apply to the children as well. I believe using adapters might solve this issue but is it possible to fix using the data pre-processor?

Example : https://codepen.io/Arunpragadeeswar/pen/QWXgPvz

Environment (if applicable) Version : Amcharts 5 Browser : Chrome Framework : Ember

martynasma commented 3 months ago

That is correct. DataProcessor will only process top-level of data, and will not do recursive processing.

I hope it's not a huge issue.

ArunPragadeeswar007 commented 3 months ago

@martynasma how can convert the color codes to color object for nested data ?

martynasma commented 3 months ago

You can build your own data iterator and just convert colors to Color objects via static function am5.Color.fromAny(....).

github-actions[bot] commented 2 months ago

This issue is stale because it has been open 30 days with no activity. It will be closed in 5 days unless a new comment is added.