
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
handwritten-graph
Advanced tools
A TypeScript library to create handwritten-style line graphs and pie charts using D3.js
A modern TypeScript library for creating hand-drawn style charts inspired by comics and sketches. Built with D3.js and designed with type safety and excellent developer experience in mind.
Here’s some example of a graph generated with this library:



npm install handwritten-graph
Or via CDN:
<script src="https://unpkg.com/handwritten-graph@latest/dist/handwritten-graph.js"></script>
import { LineChart, BarChart, PieChart } from 'handwritten-graph';
// Sample data that can be reused across chart types
const chartData = {
labels: ["Q1", "Q2", "Q3", "Q4"],
datasets: [
{
label: "Revenue",
data: [65, 59, 80, 81],
lineColor: "rgb(75, 192, 192)", // For LineChart
barColor: "#36A2EB" // For BarChart
}
]
};
// Line Chart with Area Fill
const lineChart = new LineChart("#line-chart-container", chartData, {
showArea: true,
useScribbleFill: true
});
// Bar Chart (Vertical)
const barChart = new BarChart("#bar-chart-container", chartData, {
orientation: 'vertical',
showValues: true
});
// Horizontal Bar Chart
const horizontalBarChart = new BarChart("#horizontal-bar-container", chartData, {
orientation: 'horizontal'
});
// Pie Chart
const pieData = [
{ label: "Marketing", value: 30, color: "#FF6384" },
{ label: "Development", value: 45, color: "#36A2EB" },
{ label: "Research", value: 15, color: "#FFCE56" },
{ label: "Administration", value: 10, color: "#4BC0C0" }
];
const pieChart = new PieChart("#pie-chart-container", pieData, {
useScribbleFill: true,
fillStyle: 'directional'
});
// Using factory functions for backward compatibility
const lineCleanup = HandwrittenGraph.createGraph("#graph-container", chartData);
const barCleanup = HandwrittenGraph.createBarChart("#bar-container", chartData);
const pieCleanup = HandwrittenGraph.createPieChart("#pie-container", pieData);
// Clean up when done
lineCleanup();
barCleanup();
pieCleanup();
// Line Chart
new LineChart(selector: string, data: LineChartData, config?: Partial)
// Bar Chart
new BarChart(selector: string, data: BarChartData, config?: Partial)
// Pie Chart
new PieChart(selector: string, data: PieChartData, config?: Partial)
interface BaseChartConfig {
width?: number;
height?: number;
handDrawnEffect?: boolean;
useScribbleFill?: boolean; // Enable artistic fill patterns
fillStyle?: 'directional' | 'oilpaint'; // Fill pattern style
}
// LineChart specific
interface LineChartConfig extends BaseChartConfig {
showArea?: boolean; // Enable area fill under lines
pointRadius?: number;
lineColor?: string;
}
// BarChart specific
interface BarChartConfig extends BaseChartConfig {
orientation?: 'vertical' | 'horizontal'; // Chart orientation
showValues?: boolean; // Show value labels on bars
barSpacing?: number;
groupSpacing?: number;
}
// PieChart specific
interface PieChartConfig extends BaseChartConfig {
innerRadius?: number; // For donut charts
legendBorder?: boolean;
}
# Install dependencies
npm install
# Development build with watch
npm run dev
# Production build
npm run build
# Testing
npm run test
The library follows modern TypeScript patterns:
MIT License - see LICENSE file for details.
showArea optionshowValues optionFAQs
A TypeScript library to create handwritten-style line graphs and pie charts using D3.js
We found that handwritten-graph demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.