Skip to content

Instantly share code, notes, and snippets.

@jenil
jenil / Charting.tsx
Last active June 19, 2019 20:32
charting-blog-2
import { addPropertyControls, Color, ControlType, Frame } from "framer";
import * as React from "react";
import Chart from "react-apexcharts";
enum ChartTypes {
Line = "line",
Area = "area",
Bar = "bar",
Heatmap = "heatmap",
Radar = "radar"
@jenil
jenil / mock-data.js
Created June 19, 2019 18:37
Generate mock data for time series used in graphs
export function makeSeries(seriesCount: number, points: number) {
return Array(seriesCount)
.fill({
data: [],
})
.map(s => {
return {
data: Array(points)
.fill(1)
.map((d, i) => [
@jenil
jenil / Charting.tsx
Created June 19, 2019 20:31
charting-blog-1
import { addPropertyControls, Color, ControlType, Frame } from "framer";
import * as React from "react";
import Chart from "react-apexcharts";
export const Charting = function(props) {
return <h1>Charting</h1>;
};
@jenil
jenil / Charting.tsx
Created June 19, 2019 20:44
charting-blog-3
import { addPropertyControls, Color, ControlType, Frame } from "framer";
import * as React from "react";
import Chart from "react-apexcharts";
enum ChartTypes {
Line = "line",
Area = "area",
Bar = "bar",
Heatmap = "heatmap",
Radar = "radar"
@jenil
jenil / figma-process-webhook.js
Last active April 23, 2021 09:17
Figma webhook to Slack notifications
const https = require("https");
exports.handler = (req, ctx, callback) => {
const event = JSON.parse(req.body);
console.log("Event:", event);
let response = {
statusCode: 200,
body: "ok"
};