Support different kinds of pie charts

Registered by Ana Krivokapić on 2014-02-20

Currently the D3 pie chart implementation we have in Horizon supports only one type of charts. You feed the chart with the current value and the maximum value, and it displays the "usage" - the percentage of the maximum value that is occupied by the current value. This is useful for displaying the "usage" type of situations, e.g. 2 instances used out of 10, 8 GB RAM used out of 50 GB, etc (see for example the project overview and admin overview pages in Horizon).

However, we also need to cover different use cases. One example is the distribution of resources in Tuskar UI that we need to represent by a pie chart. (See page 5 of this document: http://people.redhat.com/~jcoufal/openstack/tripleo/2013-12-03_tripleo-ui_02-resources.pdf)

The needed features are:

* Support for more than 2 values. Currently the pie chart only supports 2 - current and max; we need support for an arbitrary number of values.
* Support for different color schemes. The current color scheme works well with the current use case - low usage is represented with the blue color, then as the usage grows, the color changes to orange and red. This does not work well with the "distribution" use case mentioned above. We probably need the ability to explicitly select colors and assign them to particular "slices" of the pie.

One possible way of implementing this:

* Leave the current pie chart as it is, rename it to something like "usage pie chart". Add a second "type" of pie chart and name it "distribution pie chart".

Blueprint information

Status:
Complete
Approver:
David Lyle
Priority:
Medium
Drafter:
Ana Krivokapić
Direction:
Approved
Assignee:
Ana Krivokapić
Definition:
Approved
Series goal:
Accepted for icehouse
Implementation:
Implemented
Milestone target:
milestone icon 2014.1
Started by
Ana Krivokapić on 2014-02-24
Completed by
Ana Krivokapić on 2014-02-28

Related branches

Sprints

Whiteboard

Gerrit topic: https://review.openstack.org/#q,topic:bp/piechart-enhancement,n,z

Addressed by: https://review.openstack.org/75955
    Enhance pie chart capabilities

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.