Skip to content

Instantly share code, notes, and snippets.

View bumbeishvili's full-sized avatar
🏠
Working from home

David Bumbeishvili bumbeishvili

🏠
Working from home
View GitHub Profile
<div id="graph-container"></div>
<script>
let dataSample = [
{name:1,value:1},
{name:2,value:2},
]
let chart = new Chart()
@bumbeishvili
bumbeishvili / Chart.js
Created January 18, 2024 18:51
D3.Js Class
class Chart {
constructor() {
// Defining state attributes
const attrs = {
id: "ID" + Math.floor(Math.random() * 1000000),
svgWidth: 400,
svgHeight: 200,
marginTop: 5,
marginBottom: 5,
marginRight: 5,
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 2.
"Country Name","Country Code","Indicator Name","Indicator Code","1960","1961","1962","1963","1964","1965","1966","1967","1968","1969","1970","1971","1972","1973","1974","1975","1976","1977","1978","1979","1980","1981","1982","1983","1984","1985","1986","1987","1988","1989","1990","1991","1992","1993","1994","1995","1996","1997","1998","1999","2000","2001","2002","2003","2004","2005","2006","2007","2008","2009","2010","2011","2012","2013","2014","2015","2016","2017","2018",
"Aruba","ABW","GDP growth (annual %)","NY.GDP.MKTP.KD.ZG","","","","","","","","","","","","","","","","","","","","","","","","","","","","16.078431372549","18.6486486486487","12.129840546697","3.96140172676485","7.96287249633609","5.88235294117648","7.30769230769231","8.20390282755874","2.54714266234267","1.18578998761679","7.04687220657432","1.99198836186616","1.23803928308813","7.61658970418881","-2.97125698742023","-3.27364688726264","1.97554728660143","7.91156467197911","1.21434883180251","1.0506066363106","1.800225853688","-0.0907077
@bumbeishvili
bumbeishvili / .block
Last active September 22, 2022 12:59
Employees Hierarchy Chart using d3.js
license: mit
// Old
d3.selectAll('rect')
.data(data)
.append('rect')
// New
d3.selectAll('rect')
.data(data)
.join('rect')
@bumbeishvili
bumbeishvili / .block
Created February 2, 2018 09:24 — forked from micahstubbs/.block
mixed mode rendering (Canvas + SVG)
license: CC0-1.0
@bumbeishvili
bumbeishvili / .block
Last active April 9, 2021 20:33
Organizational chart using d3.v5
license: mit
@bumbeishvili
bumbeishvili / .block
Created February 27, 2018 11:15 — forked from XavierGimenez/.block
Grouping nodes in a Force-Directed Graph
license: gpl-3.0
height: 600
console.log('test')
@bumbeishvili
bumbeishvili / .block
Created March 9, 2018 16:13 — forked from Fil/.block
geoVoronoi polygons()
license: mit