Comments (5)
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?
from cal-heatmap.
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 ?
from cal-heatmap.
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.
from cal-heatmap.
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.
from cal-heatmap.
Perfect! Looking forward to this feature.
from cal-heatmap.
Related Issues (20)
- Feature request - multiple highlights HOT 1
- Can't able to change the months language HOT 2
- Color background doesn't match with condition HOT 1
- Year template goes wrong before the date 1894-01-01 HOT 1
- Not being able to adjust the calendar dimensions to 100% of its div based on the screen size HOT 1
- Resize calendar HOT 1
- Problem with timestamp and timezone HOT 6
- groupY median does not exist HOT 1
- Add custom subdomain classes
- Custom scales in CSS HOT 1
- React project using cal-heatmap and TypeScript cannot be built HOT 2
- Angular/Typescript typing issue HOT 3
- Commonjs export is not working HOT 1
- get other info from source data HOT 3
- Type is not correctly exported in
- Type is not correctly exported in "exports" HOT 1
- data is not filled into cal boxes HOT 8
- Could not find a declaration file for module 'cal-heatmap' HOT 3
- Hours subdomain is not honoring local browser time HOT 1
- New external plugins repositories HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cal-heatmap.