Charts and Graphs doesn't unify chart types across different charting libraries as it should.

For example, the graph type bar results in a vertical bar graph with Bluff and Open Charts Flash 2 and results in a horizontal bar graph with amCharts.

Charts and Graphs should unify this.

Unifying this might broke some current implementation that rely on current behavior.

Comments

rsevero’s picture

This problem wasn't apparent with amCharts because it's settings file wasn't being passed to amCharts.swf

rsevero’s picture

Assigned: Unassigned » rsevero
Status: Active » Fixed

I was wrong when I said I would break current behavior. With amCharts fix and graph type standardization current behavior is maintained.

irakli’s picture

Status: Fixed » Postponed (maintainer needs more info)

This is interesting and one of the most important (alas, non trivial) problems in this API, for sure.

Given that each chart implementation has a completely unrelated list of chart types (names don't match, even when they match they may behave differently as in your example) I am not sure this is possible.

If we unify we will have to go with the least common denominator and that will be 4 types at most - not cool at all.

I think a more flexible approach is for each chart implementation to expose the list of chart types they can render and let the API client decide what they want to do with it.

This would work well with View Charts - when a chart engine is picked, that can refresh chart type dropdown so for each engine you would get a choice of the full list of chart types. Which is not possible with the unification.

I think Charts & Graphs should make it easy to work with different engines but it should not try to obfuscate their functionality because this will inevitably lead to lost functionality.

rsevero’s picture

I implemented a different approach to this issue which I believe solved the issues you are concerned about.

It's true the names each charting library gives to each chart type are completely unrelated. What I did was unify the chart types names each charting library exposed to Charts and Graphs users.

For example, all charting libraries have a stacked side bar chart despite having completely different names for this same beast. I unified the names each charting library exposes as 'stacked_side_bar'. This unified chart type name is internally translated to the specific chart type name each charting library uses.

In the process of doing it I identified a few chart types previously exposed which weren't working. They got fixed. I also exposed several new chart types previously hidden.

And all chart types exposed by each charting library are now documented in each charting library's Advanced Help page.

AFAICT the end result if quite good as we now have several new chart types exposed, a few previously non-working chart types fixed and unified chart type names

I believe there are no previously working chart types that had their exposed name changed.

irakli’s picture

I would have to look into code to see the changes to better understand what you are talking about.

Let me get back to you when I have done it, ok?

Thanks.

rsevero’s picture

Status: Postponed (maintainer needs more info) » Fixed

I'm closing it. Please reopen if necessary.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.