Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

abstract-chart

Package Overview
Dependencies
Maintainers
12
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

abstract-chart - npm Package Compare versions

Comparing version 3.2.0 to 3.2.1

1

lib/chart.d.ts

@@ -20,2 +20,3 @@ import * as AbstractImage from "abstract-image";

readonly gridThickness: number;
readonly font: string;
readonly fontSize: number;

@@ -22,0 +23,0 @@ readonly labelLayout: LabelLayout;

15

lib/chart.js

@@ -27,3 +27,3 @@ "use strict";

function createChart(props) {
const { width = 600, height = 400, chartPoints = [], chartLines = [], chartStack = createChartStack({}), xAxisBottom = Axis.createLinearAxis(0, 100, ""), xAxisTop = undefined, yAxisLeft = Axis.createLinearAxis(0, 100, ""), yAxisRight = undefined, backgroundColor = AbstractImage.white, gridColor = AbstractImage.gray, gridThickness = 1, fontSize = 12, labelLayout = "original", } = props || {};
const { width = 600, height = 400, chartPoints = [], chartLines = [], chartStack = createChartStack({}), xAxisBottom = Axis.createLinearAxis(0, 100, ""), xAxisTop = undefined, yAxisLeft = Axis.createLinearAxis(0, 100, ""), yAxisRight = undefined, backgroundColor = AbstractImage.white, gridColor = AbstractImage.gray, gridThickness = 1, font = "Arial", fontSize = 12, labelLayout = "original", } = props || {};
return {

@@ -42,2 +42,3 @@ width,

gridThickness,
font,
fontSize,

@@ -303,3 +304,3 @@ labelLayout,

AbstractImage.createPolyLine(points, l.color, l.thickness),
AbstractImage.createText(last, l.label, "Arial", chart.fontSize, AbstractImage.black, "normal", 0, "center", "right", "down", 0, AbstractImage.black, false),
AbstractImage.createText(last, l.label, chart.font, chart.fontSize, AbstractImage.black, "normal", 0, "center", "right", "down", 0, AbstractImage.black, false),
]);

@@ -318,3 +319,3 @@ });

shape,
AbstractImage.createText(position, p.label, "Arial", chart.fontSize, AbstractImage.black, "normal", 0, "center", "right", "down", 0, AbstractImage.black, false),
AbstractImage.createText(position, p.label, chart.font, chart.fontSize, AbstractImage.black, "normal", 0, "center", "right", "down", 0, AbstractImage.black, false),
]);

@@ -360,3 +361,3 @@ });

const position = AbstractImage.createPoint(Axis.transformValue(l, xMin, xMax, xAxis), y);
return AbstractImage.createText(position, formatNumber(l), "Arial", chart.fontSize, AbstractImage.black, "normal", 0, "center", "uniform", growVertical, 0, AbstractImage.black, false);
return AbstractImage.createText(position, formatNumber(l), chart.font, chart.fontSize, AbstractImage.black, "normal", 0, "center", "uniform", growVertical, 0, AbstractImage.black, false);
});

@@ -368,3 +369,3 @@ return AbstractImage.createGroup("Labels", xLabels);

const position = AbstractImage.createPoint(x, y);
return AbstractImage.createText(position, label, "Arial", chart.fontSize, AbstractImage.black, "normal", 0, "center", horizontalGrowthDirection, verticalGrowthDirection, 0, AbstractImage.black, false);
return AbstractImage.createText(position, label, chart.font, chart.fontSize, AbstractImage.black, "normal", 0, "center", horizontalGrowthDirection, verticalGrowthDirection, 0, AbstractImage.black, false);
}

@@ -385,3 +386,3 @@ exports.generateXAxisLabel = generateXAxisLabel;

const position = AbstractImage.createPoint(x, Axis.transformValue(l, yMin, yMax, yAxis));
return AbstractImage.createText(position, formatNumber(l), "Arial", chart.fontSize, AbstractImage.black, "normal", 0, "center", growHorizontal, "uniform", 0, AbstractImage.black, false);
return AbstractImage.createText(position, formatNumber(l), chart.font, chart.fontSize, AbstractImage.black, "normal", 0, "center", growHorizontal, "uniform", 0, AbstractImage.black, false);
});

@@ -393,3 +394,3 @@ return AbstractImage.createGroup("Labels", yLabels);

const position = AbstractImage.createPoint(x, y);
return AbstractImage.createText(position, label, "Arial", chart.fontSize, AbstractImage.black, "normal", -90, "center", horizontalGrowthDirection, verticalGrowthDirection, 0, AbstractImage.black, false);
return AbstractImage.createText(position, label, chart.font, chart.fontSize, AbstractImage.black, "normal", -90, "center", horizontalGrowthDirection, verticalGrowthDirection, 0, AbstractImage.black, false);
}

@@ -396,0 +397,0 @@ exports.generateYAxisLabel = generateYAxisLabel;

{
"name": "abstract-chart",
"version": "3.2.0",
"version": "3.2.1",
"description": "Drawing charts using multiple unit of measure axes as coordinate system",

@@ -25,3 +25,3 @@ "repository": "https://github.com/dividab/abstract-visuals/tree/master/packages/abstract-chart",

},
"gitHead": "4e74542bd1f1968608c09e0bff052881e511d76c"
"gitHead": "ce86a5ef9a7db865039dc76458f984a9991a5c05"
}

@@ -24,2 +24,3 @@ import * as AbstractImage from "abstract-image";

readonly gridThickness: number;
readonly font: string;
readonly fontSize: number;

@@ -45,2 +46,3 @@ readonly labelLayout: LabelLayout;

gridThickness = 1,
font = "Arial",
fontSize = 12,

@@ -62,2 +64,3 @@ labelLayout = "original",

gridThickness,
font,
fontSize,

@@ -524,3 +527,3 @@ labelLayout,

l.label,
"Arial",
chart.font,
chart.fontSize,

@@ -559,3 +562,3 @@ AbstractImage.black,

p.label,
"Arial",
chart.font,
chart.fontSize,

@@ -631,3 +634,3 @@ AbstractImage.black,

formatNumber(l),
"Arial",
chart.font,
chart.fontSize,

@@ -660,3 +663,3 @@ AbstractImage.black,

label,
"Arial",
chart.font,
chart.fontSize,

@@ -707,3 +710,3 @@ AbstractImage.black,

formatNumber(l),
"Arial",
chart.font,
chart.fontSize,

@@ -736,3 +739,3 @@ AbstractImage.black,

label,
"Arial",
chart.font,
chart.fontSize,

@@ -739,0 +742,0 @@ AbstractImage.black,

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc