Navigation Menu

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,
// Old
d3.selectAll('rect')
.data(data)
.append('rect')
// New
d3.selectAll('rect')
.data(data)
.join('rect')
console.log('test')
This file has been truncated, but you can view the full file.
This file has been truncated, but you can view the full file.
[
{
"header":{
"discipline":0,
"disciplineName":"Meteorological products",
"gribEdition":2,
"gribLength":10048,
"center":7,
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
.d3-tip {
font-family: Arial, Helvetica, sans-serif;
line-height: 1.4;
padding: 12px;
pointer-events: none;
color: #203d5d;
box-shadow: 0 4px 20px 4px rgba(0, 20, 60, .1), 0 4px 80px -8px rgba(0, 20, 60, .2);
background-color: #fff;
border-radius: 4px;
}
This file has been truncated, but you can view the full file.
[
{
"header":{
"discipline":0,
"disciplineName":"Meteorological products",
"gribEdition":2,
"gribLength":45139,
"center":7,