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

update() API to update data #24

Closed
wa0x6e opened this issue Jul 18, 2013 · 5 comments
Closed

update() API to update data #24

wa0x6e opened this issue Jul 18, 2013 · 5 comments
Milestone

Comments

@wa0x6e
Copy link
Owner

wa0x6e commented Jul 18, 2013

No description provided.

@SirDerpington
Copy link

Is there any kind of workaround till 3.1 is ready to use?

I just tried a workaround but it's really dirty. It works but I don't know much about svgs...

http://jsfiddle.net/SirDerpington/5Hkud/1/

Basically I just reinsert all initial settings und play a bit with the widths of each svg. I coulnd't figure out how or when I should reset the width of the .graph svg so i just put a overflow: hidden; on the itemSelector div. Otherwise a horizontal scrollbar would appear.

var domains = $('.graph').children('svg');
var width = Number(domains.first().attr('width'));
var x = 0;
domains.each(function () {
    $(this).attr('x', x);
     x += width;
 });
 $('.graph-legend').attr('width', x);

I know..not really smart but it works. Is there maybe another possible, easier solution?

@wa0x6e
Copy link
Owner Author

wa0x6e commented Aug 3, 2013

You seems to be missing the point of the update() feature.

update() will be used to update a date, to change that date associated value, so the cell on the calendar will eventually change color.

What you're trying to do is moving cells around, and not related to update().
What feature are you looking for ?

@SirDerpington
Copy link

Oh well...I indeed missunderstood the update() feature. I just read the title "...to update data"

What I'm looking for is to dynamically change the data which sould be showed.
Let's say I have a table on my page. It displays a list of users and their transactions on a daily basis. On page load the graph shows the transactions per day for all users. (so if each of e.g. 10 users made 10 transactions on a day the graph shows 100 transactions for this day)

But in my table I have an option like a select dropdown where you can choose a user to only show his transactions. After choosing a specific user it should only show the graph with his transactions. Therefore I would do an ajax call and afterwards exchange the data source of the CalHeatMap.
See this jsfiddle http://jsfiddle.net/SirDerpington/5Hkud/. (same example as above but without my "workaround")

But I couldn't find much about updating the data source dynamically. I hope my desired feature is clear now.

@wa0x6e
Copy link
Owner Author

wa0x6e commented Aug 3, 2013

I see now, what you're seeking is exactly what the update() API is intended for: dynamically change the content of the calendar.

ETA for this feature is before monday.

@SirDerpington
Copy link

Perfect! Looking forward to this feature.

@wa0x6e wa0x6e closed this as completed in a06200f Aug 7, 2013
wa0x6e pushed a commit that referenced this issue Nov 8, 2022
…12f5d8fcd0

[Snyk] Upgrade grunt-contrib-qunit from 1.0.1 to 1.3.0
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

2 participants