Comments (12)
You can use scaleOrdinal( ) in the newest versions.
from d4.
Hi @keesgboog can you post a block builder where I can see your code? blockbuilder.org/
from d4.
Sure, I basically copied your code in the 'getting started'.
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
</head>
<body>
<div id="test">
</div>
<script type="text/javascript">
$(document).ready(function(){
var data = [
{ x : '2010', y : 5 },
{ x : '2011', y : 15 },
{ x : '2012', y : 20 }
];
var columnChart = d4.charts.column();
d3.select('test')
.datum(data)
.call(columnChart);
});
</script>
<script type="text/javascript" src="d3.js"></script>
<script type="text/javascript" src="d4.js"></script>
</body>
I am working with d3 quite a lot to make dashboards, and am excited about d4's ability to make it easier to draw column charts.
from d4.
oh, and it needed to be:
d3.select('#test')
from d4.
👍 so it works for you now?
from d4.
nope :) sorry. I don't think it gets past
var columnChart = d4.charts.column();
that's where the error:
d4.js:95 Uncaught Error: [d4] The scale type: "ordinal" is unrecognized. D4 only supports these scale types: time, time.utc
comes in... which i can follow to be an error in l.174 function validateScale()
(from the createAxisScale() , where axis.accessors.scale is 'ordinal', which tries to go to:
scale = d3.scaleaxis.accessors.scale;
which dies if you take the validator away, because it will state:
d4.js:235 Uncaught TypeError: Cannot read property 'scale' of undefined
Does that make sense? :)
from d4.
Oh it does not work with the most current version of D3 yet. What version of D3 are you using?
from d4.
4.1.1
from d4.
Yeah that is probably it. If you look at the bower.json file you'll see the version of d3 that d4 is currently bound to https://github.com/heavysixer/d4/blob/master/bower.json 3.5.16
from d4.
Ah That worked! Thanks!
Will there be a 4+ work around at one point?
from d4.
yeah i would like to bring it current with the existing version of d3. However, I am not sure what a timeframe for that will look like. I am going to close this issue for now.
from d4.
Cool! Thanks for your help!
from d4.
Related Issues (20)
- Waterfall charts do not respect min/max of the chart domain.
- Dual-axis capability on a basic chart HOT 10
- Transitions broken on the donut chart example HOT 1
- Scales shouldn't auto-nice without an option to prevent it HOT 1
- Method to change stack order of elements HOT 7
- Better series indexing HOT 10
- Add Padding method make distinct from Margin HOT 8
- Dual-axis capability breaks when using groupedColumnSeries HOT 6
- Negative label values are not displayed properly
- Refactor as node module HOT 7
- API or documentation for scale nicing HOT 9
- Attempt to make the svg more responsive to resizing
- d4.js:1172 Uncaught ReferenceError: d4 is not defined HOT 3
- License Missing HOT 1
- Throws reference error when using Browserify (assuming will also throw error with other bundlers?) HOT 2
- missing [week,hour,0] data result wrong graph for punch-card example
- [enhance] add line for punch-card
- wrong order punch-card data result wrong graph for punch-card example
- Example links in documentation are broken
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 d4.