Questions tagged as 'd3.js'

3
answers

Gantt chart using C3.js: How to use axis Y category or Y timeseries?

I'm looking for a solution inside the java library C3.JS (Based on D3.JS) where I can create a graph that shows over a period the types of certain thing being used and interleaved. A small example: Well,Itriedtousevarchart=c3.generate({...,ax...
asked by 27.10.2014 / 13:08
0
answers

How to repeat equal data using data.map

I'm using the d3.js library and wanted it to read equal data, not overwrite the scales. Here is the code snippet that does this, and an example of my .json file: const months = data.map(function(d) { //console.log(d.month);...
asked by 18.09.2018 / 16:29
0
answers

how to access a shadowDom element using D3.js and Polymer

Good afternoon, I'm trying to make a program to draw a graphic, however I need to erase the graphics and draw it again whenever I update. I'm using D3.js to handle svg and polymer because I'm creating a web component. In short, my code looks lik...
asked by 31.01.2018 / 17:08
1
answer

D3.js include external image on the third button

This is an excerpt from an index.html of D3.js I have done, my idea is to include an external image and make it appear by clicking the 'btn3' button. In button 1 and 2 I have two graphs that work normally, the problem is to make button 3 display...
asked by 17.10.2017 / 22:38
0
answers

Display another value in the tooltip of a D3 chart

I was doing a preview and needed to display a different value on the tooltip that it displays. The view is entirely based on this template: link , and displays the values for each bar. I wanted to check if there is a possibility to displ...
asked by 07.08.2017 / 16:19
0
answers

Change "fill" of each path according to the color that is in an array

I'm doing some tests and I'm generating a map of Brazil with all the municipalities and I'm creating an array that will have the following structure: var arr = []; arr['São Paulo'] = 'red'; arr['Altamira'] = 'black'; The code I currently h...
asked by 10.10.2016 / 21:16
1
answer

How to put only the minimum and maximum scale in D3 scale?

Creating the Scale: headers.forEach(function(d) { // Coerce values to numbers. jsonObj.forEach(function(p) { y[d] = d3.scale.linear().domain( d3.extent(jsonObj, function(p) {...
asked by 26.06.2015 / 16:05
0
answers

D3.js selection type

I'm developing a script using the D3 lib to draw a graphic, but I wanted to make a method for coloring the "Axis" of my chart and for that I need to pass the selection to a method, just like the color I want "paint" only I am not able to use the...
asked by 11.12.2018 / 18:37
0
answers

d3.js LineGenerator method is not accepting my data array

Esotu trying to generate a linechart from data that I will receive dynamically, the problem is that this data arrives with a value of typo "any", and should be converted to number to be accepted by the line generator but, even doing the cast, me...
asked by 26.11.2018 / 20:16
0
answers

Array inside Array - d3.tree data

I'm building an array in the format valid for the d3-tree chart. For this, I have the data in the following format: Data column and data name of the Main Company. Example: Main Company Column-Name 1-Company A 1.1-Company A.a 1.1.1-Company A...
asked by 25.07.2018 / 09:13