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

zz-chart

Package Overview
Dependencies
Maintainers
1
Versions
122
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zz-chart - npm Package Compare versions

Comparing version 0.1.1-beta.15 to 0.1.1-beta.16

1

lib/components/shape/bar.d.ts

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

/// <reference types="web" />
import { Shape } from './index.js';

@@ -3,0 +2,0 @@ import { ShapeOptions } from '../../types/options.js';

1

lib/components/shape/gauge.d.ts

@@ -12,2 +12,3 @@ /// <reference types="react" resolution-mode="require"/>

pieGuide: d3.Selection<HTMLDivElement, unknown, null, undefined>;
pieDescription: d3.Selection<HTMLDivElement, unknown, null, undefined>;
svgEl: d3.Selection<SVGSVGElement, unknown, null, undefined>;

@@ -14,0 +15,0 @@ data: import("../../types/options.js").Data;

@@ -147,3 +147,3 @@ import { select } from 'd3';

if (this.option.label) {
const { text, position } = this.option.label;
const { text, position, description } = this.option.label;
const { clientWidth } = this.svgEl.node();

@@ -159,2 +159,14 @@ // const r = (END_ANGLE * 200) / Math.PI;

}
if (!this.pieDescription) {
this.pieDescription = select(this.ctrl.container)
.append('div')
.style('position', 'absolute');
}
if (description) {
const data = this.getData();
const str = isFunction(text)
? description(data)
: template(description, { data }) || description;
this.pieDescription.html(str);
}
if (text) {

@@ -172,2 +184,5 @@ const data = this.getData();

.style('bottom', `${40 - (y ?? 0)}px`);
this.pieDescription
.style('left', `${left - guideW / 2 + x ?? 0}px`)
.style('bottom', `${4 - (y ?? 0)}px`);
// this.pieGuide

@@ -174,0 +189,0 @@ // .style('left', `calc(50% + ${x ?? 0}px`)

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

/// <reference types="web" />
import { View } from '../../chart/view.js';

@@ -3,0 +2,0 @@ import { ShapeOptions } from '../../types/options.js';

@@ -12,3 +12,3 @@ /// <reference types="react" resolution-mode="require"/>

export declare class UPlotViewStrategy extends ViewStrategy {
shapes: ("area" | "line" | "bar" | "point")[];
shapes: ("line" | "area" | "bar" | "point")[];
qt: Quadtree;

@@ -15,0 +15,0 @@ private cursor;

@@ -151,2 +151,3 @@ /// <reference types="react" resolution-mode="require"/>

text?: string;
description?: string | ((data: Data) => string);
position?: {

@@ -153,0 +154,0 @@ x?: number;

@@ -9,3 +9,3 @@ import { ValueOf } from '../index.js';

export declare type ShapeType = ValueOf<typeof ShapeType>;
export declare const SHAPE_TYPES: ("area" | "line" | "bar" | "point")[];
export declare const SHAPE_TYPES: ("line" | "area" | "bar" | "point")[];
export declare const PolarShapeType: {

@@ -12,0 +12,0 @@ Pie: string;

{
"name": "zz-chart",
"version": "0.1.1-beta.15",
"version": "0.1.1-beta.16",
"type": "module",

@@ -5,0 +5,0 @@ "author": "Alauda",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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