Socket
Socket
Sign inDemoInstall

@toast-ui/chart

Package Overview
Dependencies
Maintainers
2
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@toast-ui/chart - npm Package Compare versions

Comparing version 4.1.3 to 4.1.4

types/brushes.d.ts

2

dist/esm/brushes/basic.d.ts
import { ClipRectAreaModel, PathRectModel, CircleModel, RectModel } from "../../types/components/series";
import { LineModel } from "../../types/components/axis";
import { ArcModel } from "../../types/components/radialAxis";
export declare type CircleStyleName = 'default' | 'plot';
export declare type RectStyleName = 'shadow';
export declare function clipRectArea(ctx: CanvasRenderingContext2D, clipRectAreaModel: ClipRectAreaModel): void;

@@ -7,0 +5,0 @@ export declare function pathRect(ctx: CanvasRenderingContext2D, pathRectModel: PathRectModel): void;

import { LabelModel, BubbleLabelModel } from "../../types/components/axis";
export declare const DEFAULT_LABEL_TEXT = "normal 11px Arial";
export declare type LabelStyleName = 'default' | 'title' | 'axisTitle' | 'rectLabel';
export declare type StrokeLabelStyleName = 'none' | 'stroke';
export interface LabelStyle {
font?: string;
fillStyle?: string;
textAlign?: CanvasTextAlign;
textBaseline?: CanvasTextBaseline;
}
export declare type StrokeLabelStyle = {
lineWidth?: number;
strokeStyle?: string;
shadowColor?: string;
shadowBlur?: number;
};
export declare type PathRectStyleName = 'shadow';
export declare const labelStyle: {

@@ -19,0 +4,0 @@ default: {

import { SectorModel } from "../../types/components/series";
export declare type SectorStyle = {
lineWidth?: number;
strokeStyle?: string;
shadowColor?: string;
shadowBlur?: number;
shadowOffsetX?: number;
shadowOffsetY?: number;
};
export declare type SectorStyleName = 'default' | 'hover' | 'nested';
export declare function sector(ctx: CanvasRenderingContext2D, sectorModel: SectorModel): void;

@@ -1,8 +0,4 @@

import Chart, { SelectSeriesInfo } from "./chart";
import Chart from "./chart";
import { AreaChartOptions, AreaSeriesData, AreaSeriesInput, PlotLine, PlotBand } from "../../types/options";
export interface AreaChartProps {
el: HTMLElement;
options: AreaChartOptions;
data: AreaSeriesData;
}
import { AreaChartProps, SelectSeriesInfo } from "../../types/charts";
/**

@@ -9,0 +5,0 @@ * @class

@@ -1,8 +0,4 @@

import Chart, { SelectSeriesInfo } from "./chart";
import Chart from "./chart";
import { BoxSeriesDataType, BarChartOptions, BoxSeriesInput, BoxSeriesData } from "../../types/options";
export interface BarChartProps {
el: HTMLElement;
options: BarChartOptions;
data: BoxSeriesData;
}
import { BarChartProps, SelectSeriesInfo } from "../../types/charts";
/**

@@ -9,0 +5,0 @@ * @class

@@ -1,8 +0,4 @@

import Chart, { SelectSeriesInfo } from "./chart";
import Chart from "./chart";
import { BoxPlotSeriesType, BoxPlotSeriesData, BoxPlotChartOptions } from "../../types/options";
export interface BoxPlotChartProps {
el: HTMLElement;
options: BoxPlotChartOptions;
data: BoxPlotSeriesData;
}
import { BoxPlotChartProps, SelectSeriesInfo } from "../../types/charts";
/**

@@ -9,0 +5,0 @@ * @class

@@ -1,8 +0,4 @@

import Chart, { SelectSeriesInfo } from "./chart";
import Chart from "./chart";
import { BubbleSeriesData, BaseOptions, BubbleSeriesDataType, BubbleSeriesInput, BubbleChartOptions } from "../../types/options";
export interface BubbleChartProps {
el: HTMLElement;
options: BaseOptions;
data: BubbleSeriesData;
}
import { BubbleChartProps, SelectSeriesInfo } from "../../types/charts";
/**

@@ -9,0 +5,0 @@ * @class

@@ -1,8 +0,4 @@

import Chart, { SelectSeriesInfo } from "./chart";
import Chart from "./chart";
import { BulletChartOptions, BulletSeriesType, BulletSeriesData } from "../../types/options";
export interface BulletChartProps {
el: HTMLElement;
options: BulletChartOptions;
data: BulletSeriesData;
}
import { BulletChartProps, SelectSeriesInfo } from "../../types/charts";
/**

@@ -9,0 +5,0 @@ * @class

import Store from "../store/store";
import EventEmitter, { CustomEventType, EventListener } from "../eventEmitter";
import EventEmitter from "../eventEmitter";
import ComponentManager from "../component/componentManager";
import Animator from "../animator";
import { ChartProps, Point, SeriesDataInput, Size, DataInput } from "../../types/options";
import { RespondersModel } from "../component/component";
import { ChartState, Options, StoreModule } from "../../types/store/store";
import Component from "../component/component";
import { RespondersModel } from "../../types/components/series";
import { CheckedLegendType } from "../../types/components/legend";
import { SelectSeriesInfo, AddSeriesDataInfo } from "../../types/charts";
import { CustomEventType, EventListener } from "../../types/eventEmitter";
export declare const DEFAULT_ANIM_DURATION = 500;
export declare type AddSeriesDataInfo = {
chartType?: string;
category?: string;
};
export declare type SelectSeriesInfo = {
seriesIndex?: number;
index?: number;
name?: string;
chartType?: 'line' | 'area' | 'column' | 'scatter';
};
export interface SelectSeriesHandlerParams<T extends Options> extends SelectSeriesInfo {

@@ -22,0 +14,0 @@ state: ChartState<T>;

@@ -365,6 +365,10 @@ import Store from "../store/store";

const delegationMethod = `on${eventType[0].toUpperCase() + eventType.substring(1)}`;
const canvasRect = this.painter.ctx.canvas.getBoundingClientRect();
const canvas = this.painter.ctx.canvas;
const canvasRect = canvas.getBoundingClientRect();
// Calculate scale for chart affected by a CSS transform.
const scaleX = canvasRect.width / canvas.offsetWidth;
const scaleY = canvasRect.height / canvas.offsetHeight;
const mousePosition = {
x: clientX - canvasRect.left,
y: clientY - canvasRect.top,
x: (clientX - canvasRect.left) / scaleX,
y: (clientY - canvasRect.top) / scaleY,
};

@@ -371,0 +375,0 @@ const newEnteredComponents = [];

@@ -1,8 +0,4 @@

import Chart, { SelectSeriesInfo } from "./chart";
import Chart from "./chart";
import { ColumnChartOptions, BoxSeriesData, BoxSeriesDataType, BoxSeriesInput } from "../../types/options";
export interface ColumnChartProps {
el: HTMLElement;
options: ColumnChartOptions;
data: BoxSeriesData;
}
import { ColumnChartProps, SelectSeriesInfo } from "../../types/charts";
/**

@@ -9,0 +5,0 @@ * @class

@@ -1,9 +0,5 @@

import Chart, { AddSeriesDataInfo, SelectSeriesInfo } from "./chart";
import Chart from "./chart";
import { ColumnLineData, ColumnLineChartOptions, Point, LineSeriesDataType, BoxSeriesDataType, PlotBand, PlotLine } from "../../types/options";
import { RespondersModel } from "../../types/components/series";
export interface ColumnLineChartProps {
el: HTMLElement;
options: ColumnLineChartOptions;
data: ColumnLineData;
}
import { RespondersModel } from "../component/component";
import { ColumnLineChartProps, AddSeriesDataInfo, SelectSeriesInfo } from "../../types/charts";
/**

@@ -10,0 +6,0 @@ * @class

@@ -1,8 +0,4 @@

import Chart, { AddSeriesDataInfo, SelectSeriesInfo } from "./chart";
import Chart from "./chart";
import { HeatmapChartOptions, HeatmapSeriesData, HeatmapSeriesDataType } from "../../types/options";
export interface HeatmapChartProps {
el: HTMLElement;
options: HeatmapChartOptions;
data: HeatmapSeriesData;
}
import { HeatmapChartProps, AddSeriesDataInfo, SelectSeriesInfo } from "../../types/charts";
/**

@@ -9,0 +5,0 @@ * @class

@@ -1,8 +0,4 @@

import Chart, { AddSeriesDataInfo, SelectSeriesInfo } from "./chart";
import Chart from "./chart";
import { LineAreaChartOptions, LineAreaData, LineSeriesDataType, PlotBand, PlotLine } from "../../types/options";
export interface LineAreaChartProps {
el: HTMLElement;
options: LineAreaChartOptions;
data: LineAreaData;
}
import { LineAreaChartProps, AddSeriesDataInfo, SelectSeriesInfo } from "../../types/charts";
/**

@@ -9,0 +5,0 @@ * @class

@@ -1,8 +0,4 @@

import Chart, { SelectSeriesInfo } from "./chart";
import Chart from "./chart";
import { LineChartOptions, LineSeriesData, LineSeriesDataType, LineSeriesInput, PlotLine, PlotBand } from "../../types/options";
export interface LineChartProps {
el: HTMLElement;
options: LineChartOptions;
data: LineSeriesData;
}
import { LineChartProps, SelectSeriesInfo } from "../../types/charts";
/**

@@ -9,0 +5,0 @@ * @class

@@ -1,8 +0,4 @@

import Chart, { AddSeriesDataInfo, SelectSeriesInfo } from "./chart";
import Chart from "./chart";
import { CoordinateDataType, LineScatterChartOptions, LineScatterData } from "../../types/options";
export interface LineScatterChartProps {
el: HTMLElement;
options: LineScatterChartOptions;
data: LineScatterData;
}
import { LineScatterChartProps, AddSeriesDataInfo, SelectSeriesInfo } from "../../types/charts";
/**

@@ -9,0 +5,0 @@ * @class

@@ -1,8 +0,4 @@

import Chart, { AddSeriesDataInfo, SelectSeriesInfo } from "./chart";
import Chart from "./chart";
import { NestedPieChartOptions, NestedPieSeriesData, NestedPieSeriesType } from "../../types/options";
export interface NestedPieChartProps {
el: HTMLElement;
options: NestedPieChartOptions;
data: NestedPieSeriesData;
}
import { NestedPieChartProps, AddSeriesDataInfo, SelectSeriesInfo } from "../../types/charts";
/**

@@ -9,0 +5,0 @@ * @class

@@ -1,8 +0,4 @@

import Chart, { SelectSeriesInfo } from "./chart";
import Chart from "./chart";
import { PieChartOptions, PieSeriesData, PieSeriesType } from "../../types/options";
export interface PieChartProps {
el: HTMLElement;
options: PieChartOptions;
data: PieSeriesData;
}
import { PieChartProps, SelectSeriesInfo } from "../../types/charts";
/**

@@ -9,0 +5,0 @@ * @class

@@ -1,8 +0,4 @@

import Chart, { SelectSeriesInfo } from "./chart";
import Chart from "./chart";
import { RadarChartOptions, RadarSeriesData, RadarSeriesInput } from "../../types/options";
export interface RadarChartProps {
el: HTMLElement;
options: RadarChartOptions;
data: RadarSeriesData;
}
import { RadarChartProps, SelectSeriesInfo } from "../../types/charts";
/**

@@ -9,0 +5,0 @@ * @class

@@ -1,8 +0,4 @@

import Chart, { SelectSeriesInfo } from "./chart";
import Chart from "./chart";
import { RadialBarChartOptions, RadialBarSeriesData, RadialBarSeriesType } from "../../types/options";
export interface RadialBarChartProps {
el: HTMLElement;
options: RadialBarChartOptions;
data: RadialBarSeriesData;
}
import { RadialBarChartProps, SelectSeriesInfo } from "../../types/charts";
/**

@@ -9,0 +5,0 @@ * @class

@@ -1,8 +0,4 @@

import Chart, { SelectSeriesInfo } from "./chart";
import Chart from "./chart";
import { CoordinateDataType, ScatterChartOptions, ScatterSeriesData, ScatterSeriesInput } from "../../types/options";
export interface ScatterChartProps {
el: HTMLElement;
options: ScatterChartOptions;
data: ScatterSeriesData;
}
import { ScatterChartProps, SelectSeriesInfo } from "../../types/charts";
/**

@@ -9,0 +5,0 @@ * @class

@@ -1,8 +0,4 @@

import Chart, { AddSeriesDataInfo, SelectSeriesInfo } from "./chart";
import Chart from "./chart";
import { TreemapChartOptions, TreemapSeriesData, TreemapSeriesType } from "../../types/options";
export interface TreemapChartProps {
el: HTMLElement;
options: TreemapChartOptions;
data: TreemapSeriesData;
}
import { TreemapChartProps, AddSeriesDataInfo, SelectSeriesInfo } from "../../types/charts";
/**

@@ -9,0 +5,0 @@ * @class

@@ -9,3 +9,3 @@ import Component from "./component";

import { AreaChartSeriesTheme } from "../../types/theme";
import { SelectSeriesInfo } from "../charts/chart";
import { SelectSeriesInfo } from "../../types/charts";
interface RenderOptions {

@@ -12,0 +12,0 @@ pointOnColumn: boolean;

@@ -5,7 +5,2 @@ import Component from "./component";

import { AxisTheme } from "../../types/theme";
export declare enum AxisType {
X = "xAxis",
Y = "yAxis",
SECONDARY_Y = "secondaryYAxis"
}
declare type CoordinateKey = 'x' | 'y';

@@ -19,2 +14,7 @@ interface RenderOptions {

}
export declare enum AxisType {
X = "xAxis",
Y = "yAxis",
SECONDARY_Y = "secondaryYAxis"
}
export default class Axis extends Component {

@@ -21,0 +21,0 @@ models: AxisModels;

import Component from "./component";
import { ChartState, Options } from "../../types/store/store";
import { AxisType } from "./axis";
import { AxisTitleOption } from "../../types/options";
import { FontTheme } from "../../types/theme";
import { LabelModel } from "../../types/components/axis";
import { AxisType } from "./axis";
export default class AxisTitle extends Component {

@@ -8,0 +8,0 @@ models: LabelModel[];

import Component from "./component";
import { AxisType } from "./axis";
import { includes } from "../helpers/utils";
import { getTitleFontString } from "../helpers/style";
import { getAxisTheme } from "../helpers/axes";
import { AxisType } from "./axis";
export default class AxisTitle extends Component {

@@ -7,0 +7,0 @@ initialize({ name }) {

import Component from "./component";
import Painter from "../painter";
import { AxisType } from "./axis";
import { ChartState, Options, CenterYAxisData, ViewAxisLabel } from "../../types/store/store";
import { TickModel, LineModel, AxisModels, LabelModel } from "../../types/components/axis";
import { AxisTheme } from "../../types/theme";
import { AxisType } from "./axis";
declare type CoordinateKey = 'x' | 'y';

@@ -8,0 +8,0 @@ interface RenderOptions {

import Component from "./component";
import { AxisType } from "./axis";
import { makeTickPixelPositions, crispPixel } from "../helpers/calculator";
import { getAxisTheme } from "../helpers/axes";
import { getTitleFontString } from "../helpers/style";
import { AxisType } from "./axis";
export default class AxisUsingCenterY extends Component {

@@ -7,0 +7,0 @@ constructor() {

@@ -36,3 +36,3 @@ import Component from "./component";

radius: number;
style?: import("../../types/components/series").StyleProp<import("../../types/components/series").CircleStyle, import("../brushes/basic").CircleStyleName> | undefined;
style?: import("../../types/components/series").StyleProp<import("../../types/components/series").CircleStyle, import("../../types/brushes").CircleStyleName> | undefined;
seriesIndex?: number | undefined;

@@ -72,3 +72,3 @@ index?: number | undefined;

color: string;
style?: import("../../types/components/series").StyleProp<import("../../types/components/series").CircleStyle, import("../brushes/basic").CircleStyleName> | undefined;
style?: import("../../types/components/series").StyleProp<import("../../types/components/series").CircleStyle, import("../../types/brushes").CircleStyleName> | undefined;
seriesIndex?: number | undefined;

@@ -75,0 +75,0 @@ index?: number | undefined;

@@ -9,3 +9,4 @@ import Component from "./component";

import { BoxChartSeriesTheme } from "../../types/theme";
import { SelectSeriesHandlerParams, SelectSeriesInfo } from "../charts/chart";
import { SelectSeriesHandlerParams } from "../charts/chart";
import { SelectSeriesInfo } from "../../types/charts";
export declare enum SeriesDirection {

@@ -138,4 +139,4 @@ POSITIVE = 0,

active?: boolean | undefined;
chartType?: "area" | "line" | "bubble" | "bar" | "column" | "bullet" | "pie" | "radialBar" | "boxPlot" | "heatmap" | "radar" | "scatter" | "treemap" | undefined;
iconType?: "triangle" | "circle" | "line" | "rect" | "spectrum" | "pentagon" | "star" | "diamond" | "cross" | "hexagon" | undefined;
chartType?: "area" | "line" | "boxPlot" | "bullet" | "pie" | "heatmap" | "scatter" | "bar" | "column" | "bubble" | "radar" | "treemap" | "radialBar" | undefined;
iconType?: "triangle" | "circle" | "line" | "rect" | "pentagon" | "star" | "diamond" | "cross" | "hexagon" | "spectrum" | undefined;
useScatterChartIcon?: boolean | undefined;

@@ -196,4 +197,4 @@ rowIndex?: number | undefined;

active?: boolean | undefined;
chartType?: "area" | "line" | "bubble" | "bar" | "column" | "bullet" | "pie" | "radialBar" | "boxPlot" | "heatmap" | "radar" | "scatter" | "treemap" | undefined;
iconType?: "triangle" | "circle" | "line" | "rect" | "spectrum" | "pentagon" | "star" | "diamond" | "cross" | "hexagon" | undefined;
chartType?: "area" | "line" | "boxPlot" | "bullet" | "pie" | "heatmap" | "scatter" | "bar" | "column" | "bubble" | "radar" | "treemap" | "radialBar" | undefined;
iconType?: "triangle" | "circle" | "line" | "rect" | "pentagon" | "star" | "diamond" | "cross" | "hexagon" | "spectrum" | undefined;
useScatterChartIcon?: boolean | undefined;

@@ -200,0 +201,0 @@ rowIndex?: number | undefined;

@@ -66,5 +66,5 @@ import Component from "./component";

shadowColor?: string | undefined;
shadowBlur?: number | undefined;
shadowOffsetX?: number | undefined;
shadowOffsetY?: number | undefined;
shadowBlur?: number | undefined;
}[];

@@ -71,0 +71,0 @@ modelType: "bullet" | "range";

@@ -22,2 +22,6 @@ import { ChartState, Options } from "../../types/store/store";

declare type ComponentModels = AxisModels | AreaSeriesModels | BoxSeriesModels | CircleSeriesModels | LineSeriesModels | ExportMenuModels | CircleLegendModels | PieSeriesModels | RadarSeriesModels | BoxPlotSeriesModels | ZoomModels | PlotModels | RadialPlotModels | LineModel[] | LabelModel[] | DataLabelModels | LegendModel[] | HoveredSeriesModel | TreemapSeriesModels | ResetButtonModels | SpectrumLegendModels | BackButtonModels | HeatmapRectModels | NestedPieSeriesModels | ResponderSeriesModel | ScatterSeriesModels | BulletSeriesModels | BackgroundModel | RadialAxisModels;
export declare type RespondersModel = {
component: Component;
detected: ResponderModel[];
}[];
export default abstract class Component {

@@ -24,0 +28,0 @@ name: string;

@@ -20,3 +20,3 @@ import Component from "./component";

name: TooltipModelName;
eventDetectType?: "nearest" | "point" | "near" | "grouped" | undefined;
eventDetectType?: "nearest" | "grouped" | "point" | "near" | undefined;
}) => void;

@@ -23,0 +23,0 @@ private renderGroupedModels;

@@ -10,3 +10,3 @@ import Component from "./component";

import { LineChartSeriesTheme } from "../../types/theme";
import { SelectSeriesInfo } from "../charts/chart";
import { SelectSeriesInfo } from "../../types/charts";
interface RenderOptions {

@@ -40,3 +40,3 @@ pointOnColumn: boolean;

color: string;
style?: import("../../types/components/series").StyleProp<import("../../types/components/series").CircleStyle, import("../brushes/basic").CircleStyleName> | undefined;
style?: import("../../types/components/series").StyleProp<import("../../types/components/series").CircleStyle, import("../../types/brushes").CircleStyleName> | undefined;
seriesIndex?: number | undefined;

@@ -43,0 +43,0 @@ index?: number | undefined;

@@ -78,3 +78,3 @@ import Component from "./component";

value?: number | undefined;
style?: import("../../types/components/series").StyleProp<import("../brushes/sector").SectorStyle, import("../brushes/sector").SectorStyleName> | undefined;
style?: import("../../types/components/series").StyleProp<import("../../types/brushes").SectorStyle, import("../../types/brushes").SectorStyleName> | undefined;
clockwise: boolean;

@@ -99,5 +99,5 @@ drawingStartAngle: number;

lineWidth: number;
style: Pick<(import("../brushes/sector").SectorStyle & {
style: Pick<(import("../../types/brushes").SectorStyle & {
color?: string | undefined;
}) | SelectSectorStyle, "shadowColor" | "shadowBlur" | "strokeStyle" | "shadowOffsetX" | "shadowOffsetY">[];
}) | SelectSectorStyle, "shadowColor" | "shadowOffsetX" | "shadowOffsetY" | "shadowBlur" | "strokeStyle">[];
radius: {

@@ -104,0 +104,0 @@ inner: number;

@@ -5,6 +5,7 @@ import Component from "./component";

import { ChartState, CircularAxisData } from "../../types/store/store";
import { RadialBarChartOptions, CicleTypeEventDetectType } from "../../types/options";
import { SelectSeriesHandlerParams, SelectSeriesInfo } from "../charts/chart";
import { RadialBarChartOptions, CircleTypeEventDetectType } from "../../types/options";
import { SelectSeriesHandlerParams } from "../charts/chart";
import { RespondersThemeType } from "../helpers/responders";
import { TooltipData } from "../../types/components/tooltip";
import { SelectSeriesInfo } from "../../types/charts";
declare type RadialBarSeriesModels = Record<string, SectorModel[]>;

@@ -16,3 +17,3 @@ export default class RadialBarSeries extends Component {

activatedResponders: this['responders'];
eventDetectType: CicleTypeEventDetectType;
eventDetectType: CircleTypeEventDetectType;
tooltipSectorMap: Record<number, SectorResponderModel[]>;

@@ -50,3 +51,3 @@ theme: Required<RadialBarChartSeriesTheme>;

value?: number | undefined;
style?: import("../../types/components/series").StyleProp<import("../brushes/sector").SectorStyle, import("../brushes/sector").SectorStyleName> | undefined;
style?: import("../../types/components/series").StyleProp<import("../../types/brushes").SectorStyle, import("../../types/brushes").SectorStyleName> | undefined;
clockwise: boolean;

@@ -74,6 +75,6 @@ drawingStartAngle: number;

lineWidth: number;
style: Pick<(import("../brushes/sector").SectorStyle & {
style: Pick<(import("../../types/brushes").SectorStyle & {
color?: string | undefined;
groupedSector?: GroupedSector | undefined;
}) | (import("../brushes/sector").SectorStyle & {
}) | (import("../../types/brushes").SectorStyle & {
color?: string | undefined;

@@ -86,3 +87,3 @@ restSeries?: {

groupedSector?: GroupedSector | undefined;
}), "shadowColor" | "shadowBlur" | "strokeStyle" | "shadowOffsetX" | "shadowOffsetY">[];
}), "shadowColor" | "shadowOffsetX" | "shadowOffsetY" | "shadowBlur" | "strokeStyle">[];
radius: {

@@ -89,0 +90,0 @@ inner: number;

@@ -30,3 +30,3 @@ import Component from "./component";

};
getRespondersWithTheme(responders: TreemapRectResponderModel[], type: RespondersThemeType): ((Pick<TreemapRectModel, "label" | "style" | "color" | "x" | "y" | "opacity" | "width" | "height" | "type" | "thickness" | "colorRatio" | "id" | "parentId" | "hasChild" | "indexes" | "depth" | "ratio" | "colorValue"> & {
getRespondersWithTheme(responders: TreemapRectResponderModel[], type: RespondersThemeType): ((Pick<TreemapRectModel, "label" | "style" | "type" | "color" | "colorRatio" | "thickness" | "x" | "y" | "width" | "height" | "id" | "parentId" | "hasChild" | "indexes" | "depth" | "ratio" | "opacity" | "colorValue"> & {
index?: number | undefined;

@@ -39,3 +39,3 @@ data?: Partial<TooltipData> | undefined;

borderWidth?: number | undefined;
}) | (Pick<TreemapRectModel, "label" | "style" | "color" | "x" | "y" | "opacity" | "width" | "height" | "type" | "thickness" | "colorRatio" | "id" | "parentId" | "hasChild" | "indexes" | "depth" | "ratio" | "colorValue"> & {
}) | (Pick<TreemapRectModel, "label" | "style" | "type" | "color" | "colorRatio" | "thickness" | "x" | "y" | "width" | "height" | "id" | "parentId" | "hasChild" | "indexes" | "depth" | "ratio" | "opacity" | "colorValue"> & {
index?: number | undefined;

@@ -42,0 +42,0 @@ data?: Partial<TooltipData> | undefined;

@@ -0,4 +1,3 @@

import { CustomEventType, EventListener } from "../types/eventEmitter";
declare type EventType = 'needSubLoop' | 'needDraw' | 'needLoop' | 'loopStart' | 'loopComplete' | 'animationCompleted' | 'renderSpectrumTooltip' | 'renderDataLabels' | 'resetHoveredSeries' | 'resetSelectedSeries' | 'renderSelectedSeries' | 'renderHoveredSeries' | 'seriesPointHovered' | 'showTooltip' | 'hideTooltip' | CustomEventType;
export declare type CustomEventType = 'clickLegendLabel' | 'clickLegendCheckbox' | 'selectSeries' | 'unselectSeries' | 'hoverSeries' | 'unhoverSeries' | 'zoom' | 'resetZoom';
export declare type EventListener = (evt: any) => void;
export default class EventEmitter {

@@ -5,0 +4,0 @@ handlers: EventListener[];

@@ -27,2 +27,6 @@ import { Point, PieSeriesOptions, Rect, DataLabelAnchor, RadialBarSeriesOptions } from "../../types/options";

y: number;
degree: {
start: number;
end: number;
};
radius: {

@@ -32,6 +36,2 @@ inner: number;

};
degree: {
start: number;
end: number;
};
drawingStartAngle: number;

@@ -38,0 +38,0 @@ anchor: DataLabelAnchor;

@@ -1,4 +0,4 @@

import { SelectSeriesInfo } from "../charts/chart";
import { SelectSeriesInfo } from "../../types/charts";
import { BoxTypeEventDetectType, LineTypeEventDetectType } from "../../types/options";
export declare function isAvailableShowTooltipInfo(info: SelectSeriesInfo, eventDetectType: LineTypeEventDetectType | BoxTypeEventDetectType, targetChartType: 'area' | 'line' | 'column' | 'radialBar'): boolean;
export declare function isAvailableSelectSeries(info: SelectSeriesInfo, targetChartType: 'area' | 'line' | 'column' | 'scatter'): boolean;

@@ -1,18 +0,19 @@

import LineChart, { LineChartProps } from "./charts/lineChart";
import PieChart, { PieChartProps } from "./charts/pieChart";
import HeatmapChart, { HeatmapChartProps } from "./charts/heatmapChart";
import AreaChart, { AreaChartProps } from "./charts/areaChart";
import LineScatterChart, { LineScatterChartProps } from "./charts/lineScatterChart";
import LineAreaChart, { LineAreaChartProps } from "./charts/lineAreaChart";
import BarChart, { BarChartProps } from "./charts/barChart";
import ColumnChart, { ColumnChartProps } from "./charts/columnChart";
import ColumnLineChart, { ColumnLineChartProps } from "./charts/columnLineChart";
import BubbleChart, { BubbleChartProps } from "./charts/bubbleChart";
import ScatterChart, { ScatterChartProps } from "./charts/scatterChart";
import BulletChart, { BulletChartProps } from "./charts/bulletChart";
import NestedPieChart, { NestedPieChartProps } from "./charts/nestedPieChart";
import RadarChart, { RadarChartProps } from "./charts/radarChart";
import TreemapChart, { TreemapChartProps } from "./charts/treemapChart";
import BoxPlotChart, { BoxPlotChartProps } from "./charts/boxPlotChart";
import RadialBarChart, { RadialBarChartProps } from "./charts/radialBarChart";
import LineChart from "./charts/lineChart";
import PieChart from "./charts/pieChart";
import HeatmapChart from "./charts/heatmapChart";
import AreaChart from "./charts/areaChart";
import LineScatterChart from "./charts/lineScatterChart";
import LineAreaChart from "./charts/lineAreaChart";
import BarChart from "./charts/barChart";
import ColumnChart from "./charts/columnChart";
import ColumnLineChart from "./charts/columnLineChart";
import BubbleChart from "./charts/bubbleChart";
import ScatterChart from "./charts/scatterChart";
import BulletChart from "./charts/bulletChart";
import NestedPieChart from "./charts/nestedPieChart";
import RadarChart from "./charts/radarChart";
import TreemapChart from "./charts/treemapChart";
import BoxPlotChart from "./charts/boxPlotChart";
import RadialBarChart from "./charts/radialBarChart";
import { LineChartProps, PieChartProps, HeatmapChartProps, AreaChartProps, LineScatterChartProps, LineAreaChartProps, BulletChartProps, NestedPieChartProps, RadarChartProps, RadialBarChartProps, BarChartProps, BoxPlotChartProps, ColumnLineChartProps, BubbleChartProps, TreemapChartProps, ScatterChartProps, ColumnChartProps } from "../types/charts";
export default class Chart {

@@ -19,0 +20,0 @@ static lineChart: (props: LineChartProps) => LineChart;

{
"name": "@toast-ui/chart",
"version": "4.1.3",
"version": "4.1.4",
"description": "TOAST UI Application: Chart",

@@ -141,3 +141,3 @@ "main": "dist/toastui-chart.js",

},
"gitHead": "5aa24f7635a35e6649693e40bf963b811f12dca4"
"gitHead": "9bf97a469e5b11752b2b9b500b102ea1f9ac587f"
}

@@ -9,5 +9,4 @@ import { Point, Rect } from '../options';

PathRectStyleName,
} from '../../src/brushes/label';
} from '../brushes';
export type LabelModel = {

@@ -14,0 +13,0 @@ type: 'label';

import { Point, Rect, BezierPoint, BoxSeriesDataType } from '../options';
import { CircleStyleName, RectStyleName } from '../../src/brushes/basic';
import { TooltipData } from './tooltip';
import { LineModel, LabelModel } from './axis';
import { SectorStyle, SectorStyleName } from '../../src/brushes/sector';
import { LegendData } from './legend';
import { TreemapSeriesData } from '../store/store';
import Component from '../../src/component/component';
import { BubbleDataLabel } from '../theme';
import { SectorStyle, SectorStyleName, CircleStyleName, RectStyleName } from '../brushes';

@@ -15,7 +13,2 @@ export type Nullable<T> = T | null;

export type RespondersModel = {
component: Component;
detected: ResponderModel[];
}[];
export interface CircleStyle {

@@ -22,0 +15,0 @@ strokeStyle?: string;

@@ -58,24 +58,26 @@ import {

} from './options';
import { LineChartProps } from '../src/charts/lineChart';
import { AreaChartProps } from '../src/charts/areaChart';
import { BarChartProps } from '../src/charts/barChart';
import { ColumnChartProps } from '../src/charts/columnChart';
import { PieChartProps } from '../src/charts/pieChart';
import { HeatmapChartProps } from '../src/charts/heatmapChart';
import { BubbleChartProps } from '../src/charts/bubbleChart';
import { ScatterChartProps } from '../src/charts/scatterChart';
import { BulletChartProps } from '../src/charts/bulletChart';
import { RadarChartProps } from '../src/charts/radarChart';
import { TreemapChartProps } from '../src/charts/treemapChart';
import { NestedPieChartProps } from '../src/charts/nestedPieChart';
import { LineAreaChartProps } from '../src/charts/lineAreaChart';
import { LineScatterChartProps } from '../src/charts/lineScatterChart';
import { ColumnLineChartProps } from '../src/charts/columnLineChart';
import { CheckedLegendType } from './components/legend';
import { Options, HeatmapSeriesData, TreemapSeriesData } from './store/store';
import { CustomEventType, EventListener } from '../src/eventEmitter';
import { BoxPlotChartProps } from '../src/charts/boxPlotChart';
import { AddSeriesDataInfo, SelectSeriesInfo } from '../src/charts/chart';
import { CustomEventType, EventListener } from './eventEmitter';
import { AddSeriesDataInfo, SelectSeriesInfo } from './charts';
import { TooltipData as TooltipDataInfo } from './components/tooltip';
import { RadialBarChartProps } from '../src/charts/radialBarChart';
import {
AreaChartProps,
LineChartProps,
BoxPlotChartProps,
BarChartProps,
ColumnChartProps,
PieChartProps,
HeatmapChartProps,
BubbleChartProps,
ScatterChartProps,
BulletChartProps,
RadarChartProps,
TreemapChartProps,
NestedPieChartProps,
LineAreaChartProps,
LineScatterChartProps,
ColumnLineChartProps,
RadialBarChartProps,
} from './charts';

@@ -82,0 +84,0 @@ declare namespace toastui {

@@ -24,3 +24,2 @@ import { Categories, RawSeries, Options, StoreModule } from './store/store';

} from './theme';
import { AxisType } from '../src/component/axis';

@@ -48,3 +47,3 @@ export type RangeDataType<T> = [T, T];

export type BoxTypeEventDetectType = 'grouped' | 'point';
export type CicleTypeEventDetectType = 'grouped' | 'point';
export type CircleTypeEventDetectType = 'grouped' | 'point';

@@ -202,3 +201,7 @@ export type BezierPoint = {

type AxisLabelInfo = { axisName: AxisType; labels: string[]; index: number };
type AxisLabelInfo = {
axisName: 'xAxis' | 'yAxis' | 'secondaryYAxis';
labels: string[];
index: number;
};
type AxisFormatter = (value: string, axisLabelInfo: AxisLabelInfo) => string;

@@ -694,3 +697,3 @@ export type AxisTitleOption = Omit<TitleOption, 'align'>;

};
eventDetectType?: CicleTypeEventDetectType;
eventDetectType?: CircleTypeEventDetectType;
dataLabels?: DataLabelOptions;

@@ -697,0 +700,0 @@ }

@@ -44,3 +44,2 @@ import {

} from '../options';
import Store from '../../src/store/store';
import { LegendData } from '../components/legend';

@@ -116,2 +115,34 @@ import { ScatterSeriesIconType } from '../components/series';

declare class Store<T extends Options> {
state: ChartState<T>;
initStoreState: InitStoreState<T>;
computed: Record<string, any>;
actions: Record<string, ActionFunc>;
setRootState(state: Partial<ChartState<T>>): void;
setComputed(namePath: string, fn: ComputedFunc, holder: any): void;
setWatch(namePath: string, fn: WatchFunc): Function | null;
setAction(name: string, fn: ActionFunc): void;
dispatch(name: string, payload?: any, isInvisible?: boolean): void;
observe(fn: ObserveFunc): Function;
observable(target: Record<string, any>): Record<string, any>;
notifyByPath(namePath: string): void;
notify<T extends Record<string, any>, K extends keyof T>(target: T, key: K): void;
setModule(name: string | StoreModule, param?: StoreOptions | StoreModule): void;
setValue(target: Record<string, any>, key: string, source: Record<string, any>): void;
}
type StateFunc = (initStoreState: InitStoreState) => Partial<ChartState<Options>>;

@@ -118,0 +149,0 @@ type ActionFunc = (store: Store<Options>, ...args: any[]) => void;

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

import { SectorStyle } from '../src/brushes/sector';
import { SectorStyle } from './brushes';
import { ScatterSeriesIconType } from './components/series';

@@ -3,0 +3,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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