Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Composite Axes #38

Closed
bennick opened this issue Jan 14, 2014 · 15 comments
Closed

Support for Composite Axes #38

bennick opened this issue Jan 14, 2014 · 15 comments

Comments

@bennick
Copy link

bennick commented Jan 14, 2014

I came across this issue while trying to make a graph today:

http://stackoverflow.com/questions/18620053/multi-series-in-dimplejs

Can you share your ideas for the implementation? While your data hack works it requires me to have 3x the amount of objects in memory for this graph. Thanks.

screen shot 2014-01-14 at 12 23 00 pm

@johnkiernander
Copy link
Member

It's almost certainly going to be the next feature I add, I'm currently just investigating the implications for different chart types but the plan is to have the ability to define axes as follows:

...
var monthAxis = myChart.addCategoryAxis("x", "month");
var taxAxis = myChart.addMeasureAxis("y", "tax");

// NB the next two have an axis object passed to the position parameter rather than a string
var subTotalAxis = myChart.addMeasureAxis(taxAxis, "subtotal");
var totalAxis = myChart.addMeasureAxis(taxAxis, "total");

// Add series
myChart.addSeries("Tax", dimple.plot.line, [monthAxis, taxAxis]);
myChart.addSeries("Subtotal", dimple.plot.line, [monthAxis, subTotalAxis]);
myChart.addSeries("Total", dimple.plot.line, [monthAxis, totalAxis]);
...

So the first y axis is added and the second two are merged with it resulting in a single Y axis rendering 3 different values.

@bennick
Copy link
Author

bennick commented Jan 14, 2014

That looks like a nice interface. Thanks.

@bennick bennick closed this as completed Jan 14, 2014
@johnkiernander
Copy link
Member

I'd like to leave this open so I can associate it with the new functionality when it gets released.

@xvrdm
Copy link

xvrdm commented Jan 15, 2014

Sounds great :)

On Tue, Jan 14, 2014 at 9:52 PM, John Kiernander
notifications@github.comwrote:

I'd like to leave this open so I can associate it with the new
functionality when it gets released.


Reply to this email directly or view it on GitHubhttps://github.com//issues/38#issuecomment-32311472
.

@danielytics
Copy link

This is exactly what I'm looking for. Can you let us know what your progress is on this?

Currently, I use multiple hidden axes and manually set the max and min so that the scale is correct, but this breaks the marker lines on mouseover. I can't use the data hack because I want different series' drawn with different plotFunctions, but your proposed solution allows exactly what I want. 👍

@johnkiernander
Copy link
Member

It's implemented for most basic cases, you can see the branch I'm working on here:

https://github.com/PMSI-AlignAlytics/dimple/tree/composite-axes

I've been caught up in a big code refactoring but I'll try and wrap this up fairly soon.

@mjsteckel
Copy link

Just found this feature/functionality. And update on status?

@danielytics
Copy link

I've been using this feature in the 1.2.0 release for the past ~3 weeks and it seems to be working without issue.

@mjsteckel
Copy link

Very cool news. (My bad. I didn't realize that it was part of 1.2.0.)

@danielytics
Copy link

No worries! It was silently merged from the branch - I only noticed it because I was watching carefully at the time :)

Its a great feature - really makes working with dimple much more pleasant.

@mjsteckel
Copy link

Already implemented a proof of concept chart using composite axes!

It's a big help.

Kudos to John for the great work!

@johnkiernander
Copy link
Member

Thanks guys, it's good to know you've given it some testing. 1.2 isn't going to be an official release (hence silence) It is going to be version 2.0 coming very soon. I just need to document changes and add new examples. Quite a lot has changed.

@mvattuone
Copy link

+1 on this feature - thanks much John!

@johnkiernander
Copy link
Member

Added v2.0.0

@danielytics
Copy link

Can't wait to try out v2.0.0 - great work! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants