PMSI-AlignAlytics / dimple

An object-oriented API for business analytics
Other
2.73k stars 556 forks source link

Bubble chart x-axis category with addOrderRule #217

Open jsmale opened 8 years ago

jsmale commented 8 years ago

I've created a bubble chart with Categories for my x-axis and Time for my y-axis. A dot is placed on the graph where there is an entry found for each Category/Time combination. The issue I'm running into is that I am using a separate field to set the order for my category. If I try to apply it with the addOrderRule, it orders first by the count of entries for each category, and then by my order field. If I take the rule off, it ignores the count, but orders my categories alphabetically. How do I get this to ignore the count, and order using my OrderBy field? See the fiddle below for an example using actual data I am working with.

https://jsfiddle.net/z92g29wv/2/

jsmale commented 8 years ago

FYI, we found a work around by using the array overload for the addOrderRule by generating the categories in order from the source data: https://jsfiddle.net/7yb8ca0c/1/