New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

canvas-pie-chart

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

canvas-pie-chart - npm Package Compare versions

Comparing version

to
1.0.3

src/Raleway.ttf

3

dist/index.js

@@ -5,2 +5,3 @@ "use strict";

const canvas_1 = require("canvas");
canvas_1.registerFont("./src/Raleway.ttf", { family: "Raleway" });
class PieChart {

@@ -48,3 +49,3 @@ constructor(options) {

const oldLength = label.length;
const font = `bold ${Math.floor(this._WIDTH / 30)}px sans-serif`;
const font = `bold ${Math.floor(this._WIDTH / 30)}px Raleway`;
this._CTX.font = font;

@@ -51,0 +52,0 @@ let fontWidth = this._CTX.measureText(label).width;

{
"name": "canvas-pie-chart",
"version": "1.0.2",
"version": "1.0.3",
"description": "Canvas based pie chart generator.",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -1,2 +0,3 @@

import { createCanvas, Canvas, CanvasRenderingContext2D } from "canvas";
import { createCanvas, Canvas, CanvasRenderingContext2D, registerFont } from "canvas";
registerFont("./src/Raleway.ttf", { family: "Raleway"});

@@ -66,3 +67,3 @@ export class PieChart {

const oldLength = label.length;
const font = `bold ${Math.floor(this._WIDTH / 30)}px sans-serif`;
const font = `bold ${Math.floor(this._WIDTH / 30)}px Raleway`;
this._CTX.font = font;

@@ -69,0 +70,0 @@ let fontWidth = this._CTX.measureText(label).width;