vega-typings
Advanced tools
Comparing version 0.12.0 to 0.12.1
{ | ||
"name": "vega-typings", | ||
"version": "0.12.0", | ||
"version": "0.12.1", | ||
"description": "Typings for Vega.", | ||
@@ -22,4 +22,3 @@ "types": "types", | ||
"vega-util": "^1.12.1" | ||
}, | ||
"gitHead": "b690910bacfcb2580511e262400e496d9b14b04f" | ||
} | ||
} |
@@ -54,4 +54,7 @@ import { DataType, EncodeEntryName, Format, SignalValue, Spec } from '../spec'; | ||
toImageURL(type: string, scaleFactor?: number): Promise<string>; | ||
toSVG(): Promise<string>; | ||
toCanvas(): Promise<HTMLCanvasElement>; | ||
toSVG(scaleFactor?: number): Promise<string>; | ||
toCanvas( | ||
scaleFactor?: number, | ||
options?: { type?: string; context?: any }, | ||
): Promise<HTMLCanvasElement>; | ||
@@ -58,0 +61,0 @@ signal(name: string, value: SignalValue): this; |
@@ -110,3 +110,3 @@ import { | ||
/** | ||
* The integer z-index indicating the layering of the legend group relative to other axis, mark, and legend groups. | ||
* The integer z-index indicating the layering of the axis group relative to other axis, mark, and legend groups. | ||
* | ||
@@ -501,3 +501,3 @@ * @TJS-type integer | ||
/** | ||
* The padding, in pixels, between axis and text labels. | ||
* The padding in pixels between labels and ticks. | ||
* | ||
@@ -504,0 +504,0 @@ * __Default value:__ `2` |
@@ -16,3 +16,9 @@ import { | ||
import { Color } from './color'; | ||
import { ColorValueRef, NumericValueRef, ScaledValueRef } from './encode.d'; | ||
import { | ||
ColorValueRef, | ||
Gradient, | ||
NumericValueRef, | ||
ScaledValueRef, | ||
TextDirection, | ||
} from './encode.d'; | ||
import { LayoutBounds } from './layout'; | ||
@@ -67,2 +73,17 @@ import { BaseLegend } from './legend'; | ||
/** | ||
* Width of the marks. | ||
*/ | ||
width?: number | SignalRef; | ||
/** | ||
* Height of the marks. | ||
*/ | ||
height?: number | SignalRef; | ||
/** | ||
* Whether to keep aspect ratio of image marks. | ||
*/ | ||
aspect?: boolean; | ||
/** | ||
* Default fill color. | ||
@@ -73,3 +94,3 @@ * | ||
*/ | ||
fill?: Color | null | SignalRef; | ||
fill?: Color | Gradient | null | SignalRef; | ||
@@ -82,3 +103,3 @@ /** | ||
*/ | ||
stroke?: Color | null | SignalRef; | ||
stroke?: Color | Gradient | null | SignalRef; | ||
@@ -138,5 +159,5 @@ // ---------- Opacity ---------- | ||
/** | ||
* The stroke cap for line ending style. | ||
* The stroke cap for line ending style. One of `"butt"`, `"round"`, or `"square"`. | ||
* | ||
* __Default value:__ `butt` | ||
* __Default value:__ `"butt"` | ||
* | ||
@@ -147,5 +168,5 @@ */ | ||
/** | ||
* The stroke line join method. | ||
* The stroke line join method. One of `"miter"`, `"round"` or `"bevel"`. | ||
* | ||
* __Default value:__ `miter` | ||
* __Default value:__ `"miter"` | ||
* | ||
@@ -160,13 +181,4 @@ */ | ||
// ---------- Orientation: Bar, Tick, Line, Area ---------- | ||
/** | ||
* The orientation of a non-stacked bar, tick, area, and line charts. | ||
* The value is either horizontal (default) or vertical. | ||
* - For bar, rule and tick, this determines whether the size of the bar and tick | ||
* should be applied to x or y dimension. | ||
* - For area, this property determines the orient property of the Vega output. | ||
* - For line, this property determines the sort order of the points in the line | ||
* if `config.sortLineBy` is not specified. | ||
* For stacked charts, this is always determined by the orientation of the stack; | ||
* therefore explicitly specified value will be ignored. | ||
* The orientation of the area mark. One of `horizontal` or `vertical` (the default). With a vertical orientation, an area mark is defined by the `x`, `y`, and (`y2` or `height`) properties; with a horizontal orientation, the `y`, `x` and (`x2` or `width`) properties must be specified instead. | ||
*/ | ||
@@ -200,12 +212,14 @@ orient?: Orientation | SignalRef; | ||
/** | ||
* The default symbol shape to use. One of: `"circle"` (default), `"square"`, `"cross"`, `"diamond"`, `"triangle-up"`, or `"triangle-down"`, or a custom SVG path. | ||
* Shape of the point marks. Supported values include: | ||
* - plotting shapes: `"circle"`, `"square"`, `"cross"`, `"diamond"`, `"triangle-up"`, `"triangle-down"`, `"triangle-right"`, or `"triangle-left"`. | ||
* - the line symbol `"stroke"` | ||
* - centered directional shapes `"arrow"`, `"wedge"`, or `"triangle"` | ||
* - a custom [SVG path string](https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths) (For correct sizing, custom shape paths should be defined within a square bounding box with coordinates ranging from -1 to 1 along both the x and y dimensions.) | ||
* | ||
* __Default value:__ `"circle"` | ||
* | ||
*/ | ||
shape?: SymbolShape | SignalRef; | ||
shape?: SymbolShape | string | SignalRef; | ||
/** | ||
* The pixel area each the point/circle/square. | ||
* For example: in the case of circles, the radius is determined in part by the square root of the size value. | ||
* The area in pixels of the symbols bounding box. Note that this value sets the area of the symbol; the side lengths will increase with the square root of this value. | ||
* | ||
@@ -241,2 +255,9 @@ * __Default value:__ `30` | ||
/** | ||
* The direction of the text. One of `"ltr"` (left-to-right) or `"rtl"` (right-to-left). This property determines on which side is truncated in response to the limit parameter. | ||
* | ||
* __Default value:__ `"ltr"` | ||
*/ | ||
dir?: TextDirection; | ||
/** | ||
* The horizontal offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property. | ||
@@ -252,2 +273,9 @@ */ | ||
/** | ||
* The ellipsis string for text truncated in response to the limit parameter. | ||
* | ||
* __Default value:__ `"…"` | ||
*/ | ||
ellipsis?: string; | ||
/** | ||
* Polar coordinate radial offset, in pixels, of the text label from the origin determined by the `x` and `y` properties. | ||
@@ -260,3 +288,5 @@ * | ||
/** | ||
* The maximum length of the text mark in pixels (default 0, indicating no limit). The text value will be automatically truncated if the rendered size exceeds the limit. | ||
* The maximum length of the text mark in pixels. The text value will be automatically truncated if the rendered size exceeds the limit. | ||
* | ||
* __Default value:__ `0` -- indicating no limit | ||
*/ | ||
@@ -288,3 +318,5 @@ limit?: number | SignalRef; | ||
* | ||
* @minimum 0 | ||
* __Default value:__ `11` | ||
* | ||
* @minimum 0 | ||
*/ | ||
@@ -316,5 +348,47 @@ fontSize?: number | SignalRef; | ||
/** | ||
* The tooltip text to show upon mouse hover. | ||
*/ | ||
tooltip?: string | SignalRef; | ||
/** | ||
* The mouse cursor used over the mark. Any valid [CSS cursor type](https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values) can be used. | ||
*/ | ||
cursor?: Cursor | SignalRef; | ||
// ---------- Corner Radius: Bar, Tick, Rect ---------- | ||
/** | ||
* The radius in pixels of rounded rectangle corners. | ||
* | ||
* __Default value:__ `0` | ||
*/ | ||
cornerRadius?: number; | ||
/** | ||
* The radius in pixels of rounded rectangle top right corner. | ||
* | ||
* __Default value:__ `0` | ||
*/ | ||
cornerRadiusTopLeft?: number; | ||
/** | ||
* The radius in pixels of rounded rectangle top left corner. | ||
* | ||
* __Default value:__ `0` | ||
*/ | ||
cornerRadiusTopRight?: number; | ||
/** | ||
* The radius in pixels of rounded rectangle bottom right corner. | ||
* | ||
* __Default value:__ `0` | ||
*/ | ||
cornerRadiusBottomRight?: number; | ||
/** | ||
* The radius in pixels of rounded rectangle bottom left corner. | ||
* | ||
* __Default value:__ `0` | ||
*/ | ||
cornerRadiusBottomLeft?: number; | ||
} | ||
@@ -321,0 +395,0 @@ |
import { SignalRef } from '.'; | ||
import { AnchorValue } from './values'; | ||
import { Color } from './color'; | ||
import { TitleAnchor } from './title'; | ||
import { Color } from './color'; | ||
@@ -100,2 +99,5 @@ export type Field = string | SignalRef | DatumFieldRef | GroupFieldRef | ParentFieldRef; | ||
} | ||
export type Gradient = LinearGradient | RadialGradient; | ||
export interface LinearGradient extends BaseGradient { | ||
@@ -102,0 +104,0 @@ /** |
@@ -386,3 +386,3 @@ import { | ||
*/ | ||
symbolType?: SymbolShapeValue; | ||
symbolType?: SymbolShapeValue | SignalRef; | ||
@@ -389,0 +389,0 @@ // ---------- Label ---------- |
@@ -45,3 +45,3 @@ import { GroupEncodeEntry, GuideEncodeEntry, SignalRef, TextEncodeEntry } from '.'; | ||
/** | ||
* The integer z-index indicating the layering of the title group relative to other axis, mark and legend groups. | ||
* The integer z-index indicating the layering of the title group relative to other axis, mark, and legend groups. | ||
* | ||
@@ -48,0 +48,0 @@ * __Default value:__ `0`. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
112464
3976
37
1