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

@byzanteam/carbonium

Package Overview
Dependencies
Maintainers
2
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@byzanteam/carbonium - npm Package Compare versions

Comparing version 0.2.16 to 0.2.17-afe092d

src/definitions/chart/bar.ts

33

package.json
{
"name": "@byzanteam/carbonium",
"version": "0.2.16",
"version": "0.2.17-afe092d",
"description": "Another chart library.",

@@ -10,3 +10,3 @@ "main": "dist/carbonium.common.js",

"build": "vue-cli-service build --target lib --name carbonium src/index.ts",
"lint": "vue-cli-service lint src examples",
"lint": "vue-cli-service lint src examples types",
"test": "vue-cli-service test:unit",

@@ -24,20 +24,19 @@ "prepack": "npm run build"

"@byzanteam/carbonium-timer": "^0.1.1",
"d3": "^5.9.2",
"d3": "^5.11.0",
"deepmerge": "^4.0.0",
"resize-observer-polyfill": "^1.5.1",
"vue-property-decorator": "^8.1.1"
"vue-property-decorator": "^8.2.2"
},
"devDependencies": {
"@types/chai": "^4.1.0",
"@types/d3": "^5.7.2",
"@types/mocha": "^5.2.7",
"@vue/cli-plugin-babel": "^3.3.0",
"@vue/cli-plugin-eslint": "^3.3.0",
"@vue/cli-plugin-typescript": "^3.3.0",
"@vue/cli-plugin-unit-mocha": "^3.3.0",
"@vue/cli-service": "^3.3.0",
"@vue/eslint-config-airbnb": "^4.0.0",
"@vue/cli-plugin-babel": "^3.11.0",
"@vue/cli-plugin-eslint": "^3.11.0",
"@vue/cli-plugin-typescript": "^3.11.0",
"@vue/cli-plugin-unit-mocha": "^3.11.0",
"@vue/cli-service": "^3.11.0",
"@vue/eslint-config-airbnb": "^4.0.1",
"@vue/eslint-config-typescript": "^3.2.0",
"@vue/test-utils": "^1.0.0-beta.20",
"babel-eslint": "^10.0.1",
"@vue/test-utils": "^1.0.0-beta.29",
"babel-eslint": "^10.0.3",
"canvas": "^2.5.0",

@@ -52,8 +51,8 @@ "chai": "^4.1.2",

"typescript": "~3.1.1",
"vue": "^2.5.21",
"vue-router": "^3.0.1",
"vue-template-compiler": "^2.5.21"
"vue": "^2.6.10",
"vue-router": "^3.1.2",
"vue-template-compiler": "^2.6.10"
},
"peerDependencies": {
"vue": "^2.5.21"
"vue": "^2.6.10"
},

@@ -60,0 +59,0 @@ "husky": {

@@ -0,3 +1,22 @@

import { Range } from '../common'
import { TextProps } from '../shape'
export type AxisDomain = number | string
export type AxisLabelFormatter = (label: string) => string
export interface AxisRangeGetter {
(datum: any): number | string
}
export interface AxisRangeProps {
range: Range
count: number
nice: boolean
}
export type AxisType = 'continuous' | 'discrete'
export interface AxisUnit extends TextProps {
content: string
}
export * from './arc-bar'
export * from './axis'
export * from './bar'
export * from './chart'
export * from './contrast-ring'
export * from './donut'
export * from './guide'
export * from './legend'
export * from './lollipop'
export * from './parallel-ring'
export * from './tooltip'

@@ -1,24 +0,13 @@

import { Color } from '../common'
import { TextAlign } from '../shape'
import { Position } from '../common'
import { TextProps } from '../shape'
import { NotationProps } from '../ui'
export type LegendAlign = 'start' | 'center' | 'end'
export type LegendPosition = 'top' | 'right' | 'bottom' | 'left'
export type LegendLayout = 'horizontal' | 'vertical'
export interface LegendText {
align?: TextAlign
fill?: string
size: number
weight: number
export interface LegendText extends TextProps {
height: number
}
export interface LegendNotation {
name: string
fill: Color
size: string
}
export interface LegendLabel extends Partial<LegendText> {

@@ -30,3 +19,3 @@ text: string

id?: string
notation?: Partial<LegendNotation>
notation?: Partial<NotationProps>
label: LegendLabel

@@ -37,9 +26,15 @@ }

id: string
notation?: Partial<LegendNotation>
label?: Partial<LegendLabel>
notation?: Partial<NotationProps>
label?: Partial<LegendText>
items: Array<LegendItem>
}
export interface LegendEvent {
inactive: boolean
item: LegendItem
}
export interface LegendInfo {
position: LegendPosition
position: Position
show: boolean
descriptors: Record<string, LegendDescriptor>

@@ -49,4 +44,4 @@ }

export interface LegendProps {
notation: Partial<LegendNotation>
notation: Partial<NotationProps>
label: Partial<LegendText>
}

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

export * from './boundary'
export * from './color'
export * from './event'
export * from './font'
export * from './offset'
export * from './position'
export * from './shape'
export * from './range'

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

export type Coordinate = [number, number]
export type Padding = number

@@ -6,2 +8,2 @@ | [number, number]

export type Position = 'top' | 'bottom' | 'left' | 'right'
export type Position = 'top' | 'right' | 'bottom' | 'left'

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

export * from './base'
export * from './line'
export * from './point'
export * from './text'

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

import { ShapeProps, ShapeAttrs } from '../common'
import { ShapeProps, ShapeAttrs } from './base'

@@ -3,0 +3,0 @@ export type LineCap = 'butt' | 'round' | 'square'

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

import { ShapeProps, ShapeAttrs } from '../common'
import { ShapeProps, ShapeAttrs } from './base'

@@ -3,0 +3,0 @@ interface PointBase {}

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

import { Font, ShapeProps, ShapeAttrs } from '../common'
import { Font } from '../common'
import { ShapeProps, ShapeAttrs } from './base'

@@ -10,6 +11,7 @@ export type TextAlign = 'start' | 'center' | 'end'

baseline: TextBaseline
rotate: number
}
export interface TextProps extends ShapeProps, TextBase { }
export interface TextProps extends ShapeProps, TextBase {}
export interface TextAttrs extends ShapeAttrs, TextBase {}

@@ -44,2 +44,3 @@ import { LineStyle } from './shape'

fill: string
padding: Padding
}

@@ -72,3 +73,3 @@

title: TooltipText
label: TooltipText
text: TooltipText
}

@@ -75,0 +76,0 @@

import Vue from 'vue'
import {AxisRangeGetter} from '../definitions/chart'
import {Position} from '../definitions/common'
import {LineProps, TextAlign, TextProps} from '../definitions/shape'
import { AxisLabelFormatter, AxisRangeGetter, AxisRangeProps, AxisUnit } from '../definitions/chart'
import { Position } from '../definitions/common'
import { LineProps, TextProps } from '../definitions/shape'
export class Axis extends Vue {
/** 文本和刻度对齐方式 */
align: TextAlign
/** 是否为区间坐标轴 */

@@ -20,4 +17,13 @@ beginAtZero: boolean

/** 标签格式化 */
labelFormatter: AxisLabelFormatter
/** 轴标签样式 */
labelStyle: Partial<TextProps>
/** 坐标轴两头的留白 */
linePadding: [number, number]
/** 轴线样式 */
lineStyle: Partial<LineProps>
lineStyle: boolean | Partial<LineProps>

@@ -27,2 +33,5 @@ /** 坐标轴位置 */

/** 坐标轴值域配置,仅数值轴有效 */
range: AxisRangeProps
/** 坐标轴范围获取函数 */

@@ -34,11 +43,11 @@ rangeGetter: AxisRangeGetter

/** 轴标签样式 */
textStyle: Partial<TextProps>
/** 子刻度数量 */
subtick: number
/** 刻度数量 */
tickCount: number
/** 坐标轴单位设置,仅对数值坐标有效 */
unit: string | Partial<AxisUnit>
}
export {
Axis as CartesianAxis
Axis as CartesianAxis,
}
import Vue from 'vue'
import { LegendProps } from '../definitions/chart'
import { BarGapProps, LegendProps, TooltipProps } from '../definitions/chart'
import { Color } from '../definitions/common'
export class BarChart extends Vue {
/** 柱状条的宽度 */
barWidth: number
/** 柱状图的内外间隔 */
gap: Partial<BarGapProps>
/** 柱状条之间的间距(同一刻度之间) */
barSpace: number
/** 标签轴Id */
labelAxisId: string
/** 是否堆叠 */
stack: boolean
/** 标签键 */
labelKey: string
/** 规定柱状条是否是垂直的 */
verticalBar: boolean
/** 图例配置 */
legend: Partial<LegendProps>
/** 标签轴Id */
labelAxisId: string
/** 不活跃的数值键 */
maskKeys: Array<string>
/** 自定义系列颜色 */
series: Array<Color>
/** 是否堆叠 */
stack: boolean
/** Tooltip 配置 */
tooltip: Partial<TooltipProps>
/** 值轴Id */

@@ -29,5 +36,2 @@ valueAxisId: string

valueKey: string
/** 标签键 */
labelKey: string
}

@@ -37,9 +37,9 @@ import Vue from 'vue'

/** 标签配置。*/
/** 标签配置。 */
label: boolean | Partial<ContrastRingLabelProps>
/** 只能配置。*/
/** 只能配置。 */
guide: string | Partial<ContrastRingGuideProps>
/** 外半径与最大半径的比值。*/
/** 外半径与最大半径的比值。 */
outerRadius: number

@@ -46,0 +46,0 @@

@@ -8,20 +8,29 @@ import Vue from 'vue'

guide: DonutGuideProps | number | string
/** 隐藏标签 */
hideLabel: boolean
/** 标签动画时间 */
labelAnimationDuration: number
/** 偏移 */
offsets: [number, number]
/** 百分比 */
percentage: boolean
/** 图例 */
legend: Partial<LegendProps>
/** 内半径 */
innerRadius: number
/** 外半径 */
outerRadius: number
/** 渐变 */
gradient: boolean
/** hover 后半径扩大比 */
zoom: number
}
import Vue from 'vue'
import { LineProps } from '../definitions/shape'

@@ -7,4 +8,6 @@

xLineStyle: Partial<LineProps>
/** 竖线样式 */
yLineStyle: Partial<LineProps>
/**

@@ -16,2 +19,3 @@ * 是否渲染坐标轴线

renderAxisLine: boolean
/**

@@ -24,6 +28,8 @@ * 用户可自定义label,value轴的id,组件渲染时会优先选取用户设置的轴

valueAxisId: string
/** 指定值键 */
valueKey: string
/** 指定标签键 */
labelKey: string
}
import Vue from 'vue'
import { LegendPosition, LegendAlign, LegendNotation, LegendText, LegendLayout} from '../definitions/chart'
import { LegendAlign, LegendText, LegendLayout } from '../definitions/chart'
import { Offset, Position } from '../definitions/common'
import { NotationProps } from '../definitions/ui'
export class Legend extends Vue {
/** 图例项对齐方式。 */
align: LegendAlign | [LegendAlign, LegendAlign]
/** 标签内容 */
label: LegendText
/** 图例项的布局。默认为水平排列。 */
layout: LegendLayout
/** 图例符号的默认设置。 */
notation: NotationProps
/** 图例的偏移 */
offset: Offset
/** 图例项的 padding 设置。 */
padding: number | Array<number>
/** 图例在 Chart 中的位置。 */
position: LegendPosition
position: Position
/** 图例的尺寸。如果图例在左右则指图例的宽度,否则指高度。 */
size: number | string
/** 图例项的布局。默认为水平排列。 */
layout: LegendLayout
/** 图例项对齐方式。*/
align: LegendAlign | [LegendAlign, LegendAlign]
/** 列表项距外侧的偏移。 */
offset: number | string
/** 图例符号的默认设置。 */
notation: LegendNotation
/** 标签内容 */
label: LegendText
}
import Vue from 'vue'
import { LegendProps } from '../definitions/chart'
import { LineProps, PointProps } from '../definitions/shape'
export class LineChart extends Vue {
/** 线的样式 */
lineStyle: Partial<LineProps>
/** 圆点样式。*/
pointStyle: boolean | Partial<PointProps>
/**

@@ -15,3 +12,17 @@ * 用户可自定义label,value轴的id,组件渲染时会优先选取用户设置的轴

labelAxisId: string
/**
* 用户可自定义value 的 key
*/
labelKey: string
legend: Partial<LegendProps>
/** 线的样式 */
lineStyle: Partial<LineProps>
/** 圆点样式。 */
pointStyle: Partial<PointProps> | boolean
/**
* 用户可自定义label,value轴的id,组件渲染时会优先选取用户设置的轴

@@ -21,2 +32,3 @@ * 如果用户设置的轴不存在,则使用对应的第一个轴

valueAxisId: string
/**

@@ -26,6 +38,2 @@ * 用户可自定义label 的 key

valueKey: string
/**
* 用户可自定义value 的 key
*/
labelKey: string
}
import Vue from 'vue'
import {TextProps, LineProps} from '../definitions/shape'
import {ShapeProps} from '../definitions/common'
import { TextProps, LineProps } from '../definitions/shape'
import { ShapeProps } from '../definitions/core'
export class Polar extends Vue {

@@ -16,2 +17,3 @@ /**

labels: Array<string>
/**

@@ -65,3 +67,3 @@ * 半径的变化范围

export {
Polar as PolarAxis
Polar as PolarAxis,
}
import Vue from 'vue'
import { LegendProps, TooltipProps } from '../definitions/chart'
export class RoseChart extends Vue {

@@ -7,10 +9,16 @@ /** 内部背景颜色 */

/** 内半径与最大半径的比值。*/
/** 内半径与最大半径的比值。 */
innerRadius: number
/** 外半径与最大半径的比值。*/
/** 标签键 */
labelKey: string
/** 图例配置 */
legend: Partial<LegendProps>
/** 外半径与最大半径的比值。 */
outerRadius: number
/** hover 后放大的比例 */
zoom: number
/** Tooltip 配置 */
tooltip: Partial<TooltipProps>

@@ -20,4 +28,4 @@ /** 值键 */

/** 标签键 */
labelKey: string
/** hover 后放大的比例 */
zoom: number
}
import Vue from 'vue'
import { Color } from '../definitions/common'

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

@@ -12,2 +12,3 @@ export * from './components/arc-bar'

export * from './components/lollipop'
export * from './components/guide'
export * from './components/legend'

@@ -18,2 +19,3 @@ export * from './components/line'

export * from './components/rose'
export * from './components/tooltip'
export * from './components/zebra'

@@ -25,1 +27,2 @@ export * from './components/polar'

export * from './definitions/theme'
export * from './definitions/ui'

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 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

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