score:1
Accepted answer
Your csv shows that each field is wrapped inside a single space therefore instead of
var x = chart.addCategoryAxis("x", '"loc"');
var y = chart.addMeasureAxis("y", '"title"');
You should use
var x = chart.addCategoryAxis("x", ' "loc" ');
var y = chart.addMeasureAxis("y", ' "title" ');
function draw(data) {
"use strict";
var margin = 75,
width = 9000 - margin,
height = 600 - margin;
var svg = d3.select("body")
.append("svg")
.attr("width", width + margin)
.attr("height", height + margin)
.append('g')
.attr('class', 'chart');
var chart = new dimple.chart(svg, data);
chart.setBounds(100, 100, 500, 300);
var x = chart.addCategoryAxis("x", ' "loc" ');
var y = chart.addMeasureAxis("y", ' "title" ');
var lines = chart.addSeries(["project"], dimple.bar, [x, y]);
chart.draw();
};
d3.csv('https://raw.githubusercontent.com/s-matthew-english/bookish-adventure/master/data/Germany.csv', draw)
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.4.11/d3.min.js"></script>
<script src="http://dimplejs.org/dist/dimple.v1.1.1.min.js"></script>
Source: stackoverflow.com
Related Query
- d3.js and dimple, reading data in from a file rather than hard coded
- reading d3 data in from a file rather than hard coding it into a programme
- How to load data from an internal JSON array rather than from an external resource / file for a collapsible tree in d3.js?
- Loading internal JSON data rather than from an external resource / file for a sunburst in d3
- D3 - transition after reading updated data from external file
- D3 JSON file with source and index as strings rather than indices
- Drawing a radial tree from node and edges rather than children
- ScatterChart in NVD3 – Reading the data from csv file
- D3.js - Load data from CSV file and use it outside function call
- d3.js and data visualization from csv file graph width
- D3.js horizontal bar chart and data from json file
- How to create histogram using D3.js and reading data from JSON
- Reading json data from a file in d3.js not working
- d3.js not reading my JSON data from PHP file
- getting and using data from CSV file d3 v5
- (Javascript with D3) Data from CSV file only being used once and returning undefined or NaN second time
- How to get d3 to recognize push+shift as an add-new-object-to-end and remove-old-object-from-beginning, rather than as just a data change in place
- using variable to parse data with D3js when reading in from csv file
- How to read x-y values from one file and data from another in d3js?
- How to extract data from a csv file and create a line chart from it in D3.js
- How to read data generated from REST API in a Javascript file and use it another?
- D3js take data from an array instead of a file
- How to load data from a CSV file in D3 v5
- d3 - reading JSON data instead of CSV file
- Cannot import data from csv file in d3
- D3.js loading local data file from file:///
- Height transitions go from top down, rather than from bottom up in D3
- How to pull data from mysql database and visualize with D3.JS?
- Updating the data of a pack layout from JSON call and redrawing
- d3.js - max and min value from json data which has array of values
More Query from same tag
- Implementing d3-2way-tree for multilevel tree
- Turn a JSON array of arrays into <ul> and <li> elements
- Porting Parallel Coordinates code from d3.js v3.5.16 to 4.0
- How to add filter result to select menu
- Chart's Y-axis does not re-render properly in Billboard.js
- Sorting week number and year in ascending order
- Create a Year property value based on year field in json
- Toggle D3 shape depending on Boolean
- Javascript - Can not access array elements of an array created from a csv file
- Applying a date range filter to a crossfilter dimension
- Appending Stacked Bar and Another Bar Chart in D3
- PHP D3 combination for visualizing data
- Typescript d3 - Property 'pie' does not exist on type 'typeof d3'
- d3.js formatting data label on clustered chart
- Put <select> in table cell using D3
- Uncaught TypeError: canvas.selectAll(...).data(...).enter is not a function in d3
- Redrawing a D3/SVG chart for printing
- How to display sum total for currently selected series in NVD3.js Pie Chart?
- multipart post request with d3.json()/d3.xhr()
- Adding react-d3 to my react-native app causes a error
- last y-axis label getting cut off
- How can I extend D3?
- Select divs by ID prefix in d3
- D3 force layout differences between v3 and v4 when using mutliple connected components
- Transitioning d3.radar chart
- Y-Axis is Disappearing
- Why aren't the bars on my graph D3.js appearing in the correct order?
- Linked hover between elements
- Adding svg text inside svg circle in d3js
- White space between values of a line graph