gramex-chord
v1.2.3
Published
Chord chart with transaction from one set of data to another set of data with dynamic coloring options
Downloads
8
Readme
Reusable-Chord chart
A Reusable Chord chart shows the shift of 5 segments between 2 time periods.
It works with given tables on both sides w.r.t time periods. Tables code can be referred from index.html. This also has tooltip feature however provided with html code from index.html
This takes input of 6 values 1. selector-> div id/class name;
2. data ->
{ "old_wave": "arc", "latest_wave": "arc", "old_revenue": 3287.7, "new_revenue": 21795.01, "countss": 7, "cx_col": "flat" }
old_wave/latest_wave: segment name short cuts in both time periods
old_revenue/new_revenue: revenue diff. in both time periods
countss: no.of accounts it will be same in both time periods
cx_col(accepts: flat, improved, declined) : Any shift variance can be declared like this, which modifies the color of arcs
3. segment_map -> Actual segment names mapped to short cuts
4. kpi -> (accepts countss/revenue) value to be used to draw chord arcs
5. waves ->2 time periods as list
6. color_opt(true/false) --> true denotes arc color to latest time period segment, False means color of cx_col(flat:amber, improved: green, declined: red)
7. arc_colors-> define list of colors for segments (Eg: [seg1, seg2, seg3, seg4, seg5, seg5, seg4, seg3, seg2, seg1]). If single color for all the segments is required, just send one color in list.
8. mirror-> it takes true/false. When True all the segments will be drawn opposite to each other, when False, segments will be side by side.
9. defined_arc_color(default: undefined) -> If arc color need to be separate from the node color, send it here, otherwise it can be undefined
10. table_template(default:true)-> make is false, if you do not want beside tables. make it true and script id of template should be "shift-template-<selector>". <selector> is the chart element id.
11. tooltip_configurations(default: 'all'):(accepted values :all/revenue/count)
If you want to see both revenue and counts add 'all',revenue will only show both revenues and revenue growth. Wherein count will only count.
Authors and acknowledgment
Ushasree Ginne [email protected]
License
For open source projects.
Project status
Initial draft is published. Enhancements will still be continued.