score:1
Accepted answer
if you already have the string, you can just split it like this:
var a = "1,2,3"
var b = a.split(",")
console.log(b[1])
specifically, for your example, you can extract the data like this:
var data = jslines.map(function(l) {
data = l.split(",");
return({time: data[0], rx: data[1], tx: data[2]});
})
and then construct your d3 plot based on the resulting array of objects.
Source: stackoverflow.com
Related Query
- How can I parse csv data from a javascript array of strings for use in d3 graphs
- How to select elements from array field in dc.js / crossfilter / d3 and use each of them as separate data point for chart?
- How to load data from an internal JSON array rather than from an external resource / file for a collapsible tree in d3.js?
- How can I use D3.js to take an array of Javascript objects use them in a line graph?
- how to get data with tsv or csv to array in d3.js from a txt file?
- How do I convert strings from csv in d3.js and be able to use them as a dataset?
- How to reshaping Data in Javascript from array to object without losing some of the data
- How can I use CSV data in a zoomable sunburst chart?
- Javascript - Can not access array elements of an array created from a csv file
- how to convert data selected from a postgres database to json or csv to use it with d3js lib?
- How can D3js pack layout use data join by key for updates?
- In Meteor, how can I import data from a .tsv file to use in a d3.js chart?
- Create an array from csv for use with D3.js library
- How to pull information from a CSV file for use in a stacked bar chart
- How can i use the data from Hbase to visualize using d3.js
- How do I retrieve an array from a csv file in javascript using d3?
- In d3js, how to plot line chart from csv file, taking data from seperate columns for each row
- How can I use my data from a JSON string to populate dimple d3.js line chart?
- How to read data generated from REST API in a Javascript file and use it another?
- How to load data from a CSV file in D3 v5
- How to get maximum value from an array of objects to use in d3.scale.linear().domain()
- Select data from a CSV before loading it with javascript (d3 library)
- How can I get "call" to execute for each data element in D3?
- How to update elements of an HTML that the elements are created using data from a CSV file?
- Using Javascript D3 library, how can I determine mouse position in data set of an area element on mousemove event?
- How can we create an onclick event for a d3 data map?
- Copy data from csv into array in D3
- How to map data such that I can use it to generate pie chart?
- In D3, how can I create multiple elements for each data element based on value in data?
- How can I efficiently convert data from string to int within a d3 method chain?
More Query from same tag
- How to stick the dragged nodes in D3
- Correct usage of stack.values([accessor]) in D3 Streamgraph?
- Background image not applying to one div on Chrome for Mac
- Create parent child nested JSON from index
- Accessing elements associated with data using D3 after they have been generated
- D3 Bar shows data only for first date
- D3 mouseover is fine on localhost but not on deploy site
- Having trouble drawing lines in d3js
- How can I make a D3 chart responsive?
- D3.js json error when making tree
- D3js chaining transition using .call
- Only last Y-axis is being updated while dragging on d3 chart
- d3.js mypaths is not a function
- Error: Property 'x' does not exist on type '[number, number]'
- How to ignore d3.js zoom behavior if scale is maxed/minimal?
- Real time data graphing on a line chart with the help of rickshaw and d3.js
- D3 slider with ordinal values gets stuck on tick 8
- Translate zoom after domain change
- D3 - Stop Force Graph from moving around, nodes should only stay where moved
- Set y-axis maximum label to one tick increment higher in NVD3
- Center align legend text and circle
- D3.js: How to create the pop-up event when moving mouse on the svg?
- Links and Arrowheads to terminate at borders of nodes in D3
- d3js attach object to svg
- Cannot plot GeoJSON points in D3/Leaflet app
- get point coordination using path.getPointAtLength after rotation in d3 and svg
- Portion of label bold - the rest not bold
- Datamap - retrieve country code based on given x and y coordinates
- d3 GEO - Zoom to fit bounding box
- preprocessing data for d3.js