
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.
cats-charts
Advanced tools
   
CATS4U Charts is a reusable Angular chart library built on Apache ECharts and ngx-echarts. It provides easy-to-use components for rendering interactive charts such as Bar, Line, Area, Pie, Doughnut, Sankey, Timeline, and more.
Install the package along with required dependencies:
npm install cats-charts
import { ChartsLib } from 'cats-charts';
import {
BarChart,
CustomChartComponent,
DoughnutChart,
LinesChart,
PieChart,
SankeyChart
} from 'cats-charts';
@Component({
...,
imports: [
BarChart,
CustomChartComponent,
DoughnutChart,
LinesChart,
PieChart,
SankeyChart
],
})
export class App {}
| Input | Type | Description |
|---|---|---|
| config | Configuration options to customize chart and pass dynamic data | |
| theme | string | default | dark | vintage | essos | chalk | roma |
| contextMenuOptions | { label: string; value: string; icon?: string }[] | Context menu options |
| events | string[] | ['click', 'contextmenu', 'dblclick'] |
| Output | Description |
|---|---|
| contextMenuClick | ( event: any ) => void |
| chartEvent | ( event: any ) => void |
BarChartConfig {
series: {
name: string;
data: number[];
[key: string]: any;
}[];
xAxisData: string[];
colors?: string[];
backgroundColor?: string;
// --------------- Title configs ---------------
title?: string;
titlePosition?: string;
showTitle?: boolean;
// --------------- Tooltip configs ---------------
showTooltip?: boolean;
tooltipFormatter?: (params: any) => void;
// --------------- Grid configs ---------------
gridLeft?: string | number;
gridRight?: string | number;
gridBottom?: string | number;
gridTop?: string | number;
// --------------- Zoom Slider configs ---------------
showZoomSlider?: boolean;
zoomStart?: number;
zoomEnd?: number;
zoomControlButtonStyle?: any;
yAxis?: any;
xAxis?: any;
stacked?: boolean;
barWidth?: string | number;
borderRadius?: number;
showLabel?: boolean;
labelPosition?: string;
showXAxisLine?: boolean;
showYAxisLine?: boolean;
// Legend
hideLegend?: boolean;
legendPosition?: 'top' | 'bottom' | 'left' | 'right' | string;
legendAlign?: 'left' | 'center' | 'right' | string;
legendDirection?: 'horizontal' | 'vertical' | string;
legendTextColor?: string;
legendFontSize?: number;
legendContainerWidth?: number; // 0-1
legendIndicatorHeight?: number; // number value is in px
}
LineChartConfig {
isTrendChart?: boolean;
title?: string;
showTitle?: boolean;
titlePosition?: string;
xAxisData: string[];
tooltipFormatter?: (params: any) => void;
colors?: string[];
series: {
name: string;
data: number[];
areaColor?: string;
smooth?: boolean;
area?: boolean;
[key: string]: any;
}[];
// --------------- Grid configs ---------------
gridLeft?: string | number;
gridRight?: string | number;
gridBottom?: string | number;
gridTop?: string | number;
borderRadius?: number;
showLabel?: boolean;
labelPosition?: string;
yAxis?: any;
xAxis?: any;
showXAxisLine?: boolean;
showYAxisLine?: boolean;
showTooltip?: boolean;
backgroundColor?: string;
// Legend
hideLegend?: boolean;
legendPosition?: 'top' | 'bottom' | 'left' | 'right' | string;
legendAlign?: 'left' | 'center' | 'right' | string;
legendDirection?: 'horizontal' | 'vertical' | string;
legendTextColor?: string;
legendFontSize?: number;
legendContainerWidth?: number; // 0-1
legendIndicatorHeight?: number; // number value is in px
}
DoughnutChartConfig {
title?: string;
showTitle?: boolean;
titlePosition?: 'left' | 'center' | 'right';
top?: any;
bottom?: any;
backgroundColor?: string;
series?: any;
data: {
name: string;
value: number;
[key: string]: any;
}[];
colors?: string[];
// Doughnut
innerRadius?: string;
outerRadius?: string;
center?: string[];
// Center Text
showCenterText?: boolean;
centerLabel?: any;
centerValue?: string;
centerValueFromTotal?: boolean;
// Tooltip
showTooltip?: boolean;
showTooltipPercent?: boolean;
tooltipFormatter?: (params: any, config: DoughnutChartConfig) => void;
valueFormatter?: (value: number) => string;
// Legend
hideLegend?: boolean;
legendBottom?: number;
legendPosition?: 'top' | 'bottom' | 'left' | 'right' | string;
legendAlign?: 'left' | 'center' | 'right' | string;
legendDirection?: 'horizontal' | 'vertical' | string;
legendTextColor?: string;
legendFontSize?: number;
legendContainerWidth?: number; // 0-1
// Labels
showLabel?: boolean;
labelPosition?: 'inside' | 'outside' | 'center';
showLabelValue?: boolean;
showLabelPercentage?: boolean;
// Emphasis
emphasisScale?: boolean;
// Style
borderRadius?: number;
borderColor?: string;
borderWidth?: number;
enableHoverEffect?: boolean;
}
CustomChartConfig {
startHour?: string;
endHour?: string;
shiftColor?: string;
chartMode: 'weekly' | 'daily' | string;
yAxisData: string[];
categories: string[];
legends: TimeLineLegends;
barHeight?: number;
shiftHeight?: number;
data: TimelineData[];
hideLegendCategory?: boolean;
}
SankeyChartConfig {
title?: string;
showTitle?: boolean;
backgroundColor?: string;
colors?: string[];
showTooltip?: boolean;
tooltipFormatter?: (params: any) => string;
nodes: SankeyNode[];
links: SankeyLink[];
seriesOption?: SankeySeriesOption;
lineCurveness?: number;
}
SankeySeriesOption refer echarts Sankey series documentationhttps://echarts.apache.org/en/option.html#series-sankey
Available chart themes:
Apache ECharts documentation:
https://echarts.apache.org/en/api.html#echarts
Contributions, issues, and feature requests are welcome. Feel free to submit a pull request.
MIT License
FAQs
   
The npm package cats-charts receives a total of 78 weekly downloads. As such, cats-charts popularity was classified as not popular.
We found that cats-charts demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers 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.