Skip to content

Instantly share code, notes, and snippets.

@dsternlicht
dsternlicht / chartsninja-data-2.csv
Last active April 23, 2020 10:07
CSV Remote URL example 2
Dataset 1 Dataset 2 Dataset 3
January 100 200 300
February 120 240 210
March 220 340 310
@dsternlicht
dsternlicht / chartsninja-data-1.csv
Last active January 19, 2020 12:03
CSV Remote URL example 1
Dataset 1 Dataset 2 Dataset 3
100 200 300
120 240 210
320 140 310
@dsternlicht
dsternlicht / chartsninja-data-2.json
Last active January 19, 2020 12:09
Remote URL example 2
[
["Dataset 1", "Dataset 2", "Dataset 3"],
[100,200,300],
[120,170,320]
]
@dsternlicht
dsternlicht / chartsninja-data-1.json
Created January 19, 2020 09:59
Remote URL example 1
[
[100,200,300],
[120,170,320]
]
[
[100,200,300],
[120,170,320]
]
@dsternlicht
dsternlicht / option-source.json
Created January 9, 2020 06:14
RESTool Option Source Example
[
{
"field": "value 2",
"display": "Value 2"
},
{
"field": "value 1"
}
]
@dsternlicht
dsternlicht / data.json
Last active December 22, 2019 12:18
Charts Ninja - Dynamic Data
[
["test", "dynamic"],
[1,2],
[3,4],
[5,6]
]
@dsternlicht
dsternlicht / data.js
Created July 22, 2019 11:54
A data object example being used in react-dynamic-charts
[
{
"name": "Round 1",
"values": [
{
"id": 1,
"label": "Test 1",
"value": 0,
"color": "red"
},
@dsternlicht
dsternlicht / dynamic-chart.js
Last active July 22, 2019 09:20
The most basic example for using react-dynamic-charts
import React, { Component } from 'react';
import { LiveBarChart } from 'react-dynamic-charts';
import 'react-dynamic-charts/dist/index.css'; // Don't forget to import the styles
class App extends Component {
state = {
data: [
// ...
]
@dsternlicht
dsternlicht / Modal.vue
Last active November 27, 2018 14:59
Vue modal component
<template>
<div class="modal" v-bind:class="customClass" v-bind:style="{ display: show ? 'block' : 'none' }">
<div class="overlay" @click="closeCallback()"></div>
<div class="modal_content">
<slot></slot>
<button title="Close" class="close_modal" @click="closeCallback()">
<i class="fas fa-times"></i>
</button>
</div>
</div>