apache / echarts

Apache ECharts is a powerful, interactive charting and data visualization library for browser
https://echarts.apache.org
Apache License 2.0
60.13k stars 19.6k forks source link

Item Style will have the progress bars in the tree View #18526

Open soundhar07 opened 1 year ago

soundhar07 commented 1 year ago

What problem does this feature solve?

This feature will help us to visualise the value out of overall value,at what percent it is

What does the proposed API look like?

The proposed API will be needed.It will look like this tree-expansion

Ovilia commented 1 year ago

This doesn't seem to be easy to make with Tree Series. You may consider using Custom series to make the chart.

soundhar07 commented 1 year ago

@Ovilia Ma'am its the same tree but with some restrictions.I will try building it using custom.Can I have some docs how to build custom charts in Echarts. The above one is the famous decomposition view by Power BI

Ovilia commented 1 year ago

Custom series document is here. It probably requires more work to implement this with custom series than add a new feature to the tree series. If you are interested making a pull request to implement this feature for tree series, it may be a smaller change than using a custom series. But I'm not sure how to do this and it may require extra time learning how to do so.

helgasoft commented 1 year ago

Being non-familiar with Power BI, I can comment only on the chart example. It seems progress bars in the three columns are not related except for two, which are already marked by bold text. So to me this is not a tree chart, there is no hierarchy to present. Forecast Bias and Demand and the others are independent categories. Side note: tree chart symbols can be customized with SVG path to show any kind of figure, Demo Code.

The easiest way to draw this chart in ECharts is with simple lines. Since the lines differ only by length and label, one can build a function doSerie with position,length,label as inputs and a line serie as output. Then feed the function with input statistical data in format type,length,label where:

The only vexing detail is how to put a label at the start of the line. Label shows on both sides and endLabel shows at the end. Aarrghhh! 😠

soundhar07 commented 1 year ago

@helgasoft I need some help in just implementing the progress bars . 232718974-85b95ed9-3aed-4c51-912f-dcab654bd090 I need this style of itemStyle implementations