@antv/g2
Advanced tools
Comparing version 5.0.23 to 5.0.24
@@ -0,1 +1,18 @@ | ||
## [5.0.24](https://github.com/antvis/g2/compare/5.0.23...5.0.24) (2023-08-30) | ||
### Bug Fixes | ||
* **test:** call defined render function ([#5481](https://github.com/antvis/g2/issues/5481)) ([c0c5746](https://github.com/antvis/g2/commit/c0c574683f3cd97b1813fa3dc7454137b8ae6ad4)) | ||
* **theme:** update default color of light theme ([#5487](https://github.com/antvis/g2/issues/5487)) ([7cbe9a7](https://github.com/antvis/g2/commit/7cbe9a7cf8ea537c274288c4f55118b9544ae622)) | ||
### Features | ||
* 3d line plot ([#5471](https://github.com/antvis/g2/issues/5471)) ([4d157cd](https://github.com/antvis/g2/commit/4d157cd162a805d8a68a29a5abf216074fb2058f)) | ||
* **builtinlib:** move some components from core to builtinlib ([#5485](https://github.com/antvis/g2/issues/5485)) ([fc70bf5](https://github.com/antvis/g2/commit/fc70bf5423b73b1b06ff3b551e2a5a5902dd3527)) | ||
* **lib:** change graphlib and plotlib ([#5484](https://github.com/antvis/g2/issues/5484)) ([ad175a0](https://github.com/antvis/g2/commit/ad175a0b232552c94c3c6d6305da28a9c42ee497)) | ||
## [5.0.23](https://github.com/antvis/g2/compare/5.0.22...5.0.23) (2023-08-29) | ||
@@ -2,0 +19,0 @@ |
@@ -48,3 +48,2 @@ import { G2Spec } from '../spec'; | ||
readonly 'coordinate.polar': import("../runtime").CoordinateComponent<import("../coordinate").PolarOptions>; | ||
readonly 'coordinate.helix': import("../runtime").CoordinateComponent<import("../spec").HelixCoordinate>; | ||
readonly 'coordinate.transpose': import("../runtime").CoordinateComponent<import("../coordinate").TransposeOptions>; | ||
@@ -82,3 +81,2 @@ readonly 'coordinate.theta': import("../runtime").CoordinateComponent<import("../spec").ThetaCoordinate>; | ||
readonly 'mark.heatmap': import("../runtime").MarkComponent<import("..").HeatmapOptions>; | ||
readonly 'shape.label.label': import("../runtime").ShapeComponent<import("../shape").LabelShapeOptions>; | ||
readonly 'palette.category10': import("../runtime").PaletteComponent<import("../palette").Category10Options>; | ||
@@ -106,10 +104,4 @@ readonly 'palette.category20': import("../runtime").PaletteComponent<import("../palette").Category20Options>; | ||
readonly 'component.axisY': import("../runtime").GuideComponentComponent<import("../component/axis").AxisOptions>; | ||
readonly 'component.axisRadar': import("../runtime").GuideComponentComponent<import("../component/axisRadar").AxisRadarOptions>; | ||
readonly 'component.axisLinear': import("../runtime").GuideComponentComponent<import("../component/axis").AxisOptions>; | ||
readonly 'component.axisArc': import("../runtime").GuideComponentComponent<import("../component/axis").AxisOptions>; | ||
readonly 'component.legendCategory': import("../runtime").GuideComponentComponent<import("../component").LegendCategoryOptions>; | ||
readonly 'component.legendContinuous': import("../runtime").GuideComponentComponent<import("../component").LegendContinuousOptions>; | ||
readonly 'component.legendContinuousBlock': import("../runtime").GuideComponentComponent<import("../component").LegendContinuousOptions>; | ||
readonly 'component.legendContinuousBlockSize': import("../runtime").GuideComponentComponent<import("../component").LegendContinuousOptions>; | ||
readonly 'component.legendContinuousSize': import("../runtime").GuideComponentComponent<import("../component").LegendContinuousOptions>; | ||
readonly 'component.legends': import("../runtime").GuideComponentComponent<import("../component").LegendsOptions>; | ||
@@ -155,7 +147,4 @@ readonly 'component.title': import("../runtime").GuideComponentComponent<import("../runtime").G2Title>; | ||
readonly 'interaction.poptip': typeof import("../interaction").Poptip; | ||
readonly 'interaction.event': typeof import("../interaction").Event; | ||
readonly 'composition.spaceLayer': import("../runtime").CompositionComponent<import("../composition").SpaceLayerOptions>; | ||
readonly 'composition.spaceFlex': import("../runtime").CompositionComponent<import("../composition").SpaceFlexOptions>; | ||
readonly 'composition.mark': import("../runtime").CompositionComponent<import("../composition").MarkOptions>; | ||
readonly 'composition.view': import("../runtime").CompositionComponent<import("../composition").ViewOptions>; | ||
readonly 'composition.facetRect': import("../runtime").CompositionComponent<import("../composition").FacetRectOptions>; | ||
@@ -170,12 +159,12 @@ readonly 'composition.repeatMatrix': import("../runtime").CompositionComponent<import("../spec").RepeatMatrixComposition>; | ||
readonly 'data.venn': import("../runtime").DataComponent<import("../data").VennOptions>; | ||
readonly 'data.arc': import("../runtime").DataComponent<import("../data").ArcOptions>; | ||
readonly 'data.cluster': import("../runtime").DataComponent<import("../data").ClusterOptions>; | ||
readonly 'mark.sankey': import("../runtime").CompositeMarkComponent<import("..").SankeyOptions>; | ||
readonly 'mark.treemap': import("../runtime").CompositionComponent<import("..").TreemapOptions>; | ||
readonly 'mark.boxplot': import("../runtime").CompositeMarkComponent<import("../mark/boxplot").BoxPlotOptions>; | ||
readonly 'mark.pack': import("../runtime").CompositionComponent<import("..").PackOptions>; | ||
readonly 'mark.gauge': import("../runtime").CompositeMarkComponent<import("..").GaugeOptions>; | ||
readonly 'mark.wordCloud': import("../runtime").CompositeMarkComponent<import("..").WordCloudOptions>; | ||
readonly 'data.arc': import("../runtime").DataComponent<import("../data").ArcOptions>; | ||
readonly 'data.cluster': import("../runtime").DataComponent<import("../data").ClusterOptions>; | ||
readonly 'mark.forceGraph': import("../runtime").CompositeMarkComponent<import("..").ForceGraphOptions>; | ||
readonly 'mark.tree': import("../runtime").CompositeMarkComponent<import("..").TreeOptions>; | ||
readonly 'mark.pack': import("../runtime").CompositionComponent<import("..").PackOptions>; | ||
readonly 'mark.sankey': import("../runtime").CompositeMarkComponent<import("..").SankeyOptions>; | ||
readonly 'mark.treemap': import("../runtime").CompositionComponent<import("..").TreemapOptions>; | ||
readonly 'composition.geoView': import("../runtime").CompositionComponent<import("../composition/geoView").GeoViewOptions>; | ||
@@ -182,0 +171,0 @@ readonly 'composition.geoPath': import("../runtime").CompositionComponent<import("../composition/geoPath").GeoPathOptions>; |
@@ -8,4 +8,8 @@ import { G2Spec } from '../spec'; | ||
type CompositionOf<Library> = Of<Library, (composite?: any) => CompositionNode<CompositionOf<Library> & MarkOf<Library, (composite?: any) => MarkNode>> & MarkOf<Library, (composite?: any) => MarkNode> & CompositionOf<Library>>; | ||
export type API<Spec, Library> = Runtime<Spec> & MarkOf<Library, (composite?: any) => MarkNode> & CompositionOf<Library>; | ||
type BuiltinComposition = { | ||
'composition.mark': any; | ||
'composition.view': any; | ||
}; | ||
export type API<Spec, Library> = Runtime<Spec> & MarkOf<Library, (composite?: any) => MarkNode> & CompositionOf<Library & BuiltinComposition>; | ||
export declare function extend<Spec extends G2Spec = G2Spec, Library extends G2Library = G2Library>(Runtime: new (options: RuntimeOptions) => Runtime<Spec>, library: Library): new (options?: RuntimeOptions) => API<Spec, Library>; | ||
export {}; |
@@ -43,3 +43,2 @@ import { G2ComponentNamespaces, G2Component } from '../runtime'; | ||
readonly 'coordinate.polar': import("../runtime").CoordinateComponent<import("../coordinate").PolarOptions>; | ||
readonly 'coordinate.helix': import("../runtime").CoordinateComponent<import("..").HelixCoordinate>; | ||
readonly 'coordinate.transpose': import("../runtime").CoordinateComponent<import("../coordinate").TransposeOptions>; | ||
@@ -77,3 +76,2 @@ readonly 'coordinate.theta': import("../runtime").CoordinateComponent<import("..").ThetaCoordinate>; | ||
readonly 'mark.heatmap': import("../runtime").MarkComponent<import("..").HeatmapOptions>; | ||
readonly 'shape.label.label': import("../runtime").ShapeComponent<import("../shape").LabelShapeOptions>; | ||
readonly 'palette.category10': import("../runtime").PaletteComponent<import("../palette").Category10Options>; | ||
@@ -101,10 +99,4 @@ readonly 'palette.category20': import("../runtime").PaletteComponent<import("../palette").Category20Options>; | ||
readonly 'component.axisY': import("../runtime").GuideComponentComponent<import("../component/axis").AxisOptions>; | ||
readonly 'component.axisRadar': import("../runtime").GuideComponentComponent<import("../component/axisRadar").AxisRadarOptions>; | ||
readonly 'component.axisLinear': import("../runtime").GuideComponentComponent<import("../component/axis").AxisOptions>; | ||
readonly 'component.axisArc': import("../runtime").GuideComponentComponent<import("../component/axis").AxisOptions>; | ||
readonly 'component.legendCategory': import("../runtime").GuideComponentComponent<import("../component").LegendCategoryOptions>; | ||
readonly 'component.legendContinuous': import("../runtime").GuideComponentComponent<import("../component").LegendContinuousOptions>; | ||
readonly 'component.legendContinuousBlock': import("../runtime").GuideComponentComponent<import("../component").LegendContinuousOptions>; | ||
readonly 'component.legendContinuousBlockSize': import("../runtime").GuideComponentComponent<import("../component").LegendContinuousOptions>; | ||
readonly 'component.legendContinuousSize': import("../runtime").GuideComponentComponent<import("../component").LegendContinuousOptions>; | ||
readonly 'component.legends': import("../runtime").GuideComponentComponent<import("../component").LegendsOptions>; | ||
@@ -150,7 +142,4 @@ readonly 'component.title': import("../runtime").GuideComponentComponent<import("../runtime").G2Title>; | ||
readonly 'interaction.poptip': typeof import("../interaction").Poptip; | ||
readonly 'interaction.event': typeof import("../interaction").Event; | ||
readonly 'composition.spaceLayer': import("../runtime").CompositionComponent<import("../composition").SpaceLayerOptions>; | ||
readonly 'composition.spaceFlex': import("../runtime").CompositionComponent<import("../composition").SpaceFlexOptions>; | ||
readonly 'composition.mark': import("../runtime").CompositionComponent<import("../composition").MarkOptions>; | ||
readonly 'composition.view': import("../runtime").CompositionComponent<import("../composition").ViewOptions>; | ||
readonly 'composition.facetRect': import("../runtime").CompositionComponent<import("../composition").FacetRectOptions>; | ||
@@ -165,12 +154,12 @@ readonly 'composition.repeatMatrix': import("../runtime").CompositionComponent<import("..").RepeatMatrixComposition>; | ||
readonly 'data.venn': import("../runtime").DataComponent<import("../data").VennOptions>; | ||
readonly 'data.arc': import("../runtime").DataComponent<import("../data").ArcOptions>; | ||
readonly 'data.cluster': import("../runtime").DataComponent<import("../data").ClusterOptions>; | ||
readonly 'mark.sankey': import("../runtime").CompositeMarkComponent<import("..").SankeyOptions>; | ||
readonly 'mark.treemap': import("../runtime").CompositionComponent<import("..").TreemapOptions>; | ||
readonly 'mark.boxplot': import("../runtime").CompositeMarkComponent<import("../mark/boxplot").BoxPlotOptions>; | ||
readonly 'mark.pack': import("../runtime").CompositionComponent<import("..").PackOptions>; | ||
readonly 'mark.gauge': import("../runtime").CompositeMarkComponent<import("..").GaugeOptions>; | ||
readonly 'mark.wordCloud': import("../runtime").CompositeMarkComponent<import("..").WordCloudOptions>; | ||
readonly 'data.arc': import("../runtime").DataComponent<import("../data").ArcOptions>; | ||
readonly 'data.cluster': import("../runtime").DataComponent<import("../data").ClusterOptions>; | ||
readonly 'mark.forceGraph': import("../runtime").CompositeMarkComponent<import("..").ForceGraphOptions>; | ||
readonly 'mark.tree': import("../runtime").CompositeMarkComponent<import("..").TreeOptions>; | ||
readonly 'mark.pack': import("../runtime").CompositionComponent<import("..").PackOptions>; | ||
readonly 'mark.sankey': import("../runtime").CompositeMarkComponent<import("..").SankeyOptions>; | ||
readonly 'mark.treemap': import("../runtime").CompositionComponent<import("..").TreemapOptions>; | ||
readonly 'composition.geoView': import("../runtime").CompositionComponent<import("../composition/geoView").GeoViewOptions>; | ||
@@ -177,0 +166,0 @@ readonly 'composition.geoPath': import("../runtime").CompositionComponent<import("../composition/geoPath").GeoPathOptions>; |
@@ -175,3 +175,6 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
// Create composition generators. | ||
const compositions = Object.keys(library).filter((key) => key.startsWith('composition.') && key !== 'composition.mark'); | ||
const compositions = [ | ||
'composition.view', | ||
...Object.keys(library).filter((key) => key.startsWith('composition.') && key !== 'composition.mark'), | ||
]; | ||
this._compositions = Object.fromEntries(compositions.map((key) => { | ||
@@ -178,0 +181,0 @@ const name = key.split('.').pop(); |
@@ -1,2 +0,2 @@ | ||
import { ElementHighlight, ElementHighlightByX, ElementHighlightByColor, ElementSelect, ElementSelectByX, ElementSelectByColor, ChartIndex, Fisheye as ChartFisheye, Tooltip, LegendFilter, LegendHighlight, BrushHighlight, BrushXHighlight, BrushYHighlight, BrushAxisHighlight, BrushFilter, BrushXFilter, BrushYFilter, SliderFilter, Poptip, Event, ScrollbarFilter } from '../interaction'; | ||
import { ElementHighlight, ElementHighlightByX, ElementHighlightByColor, ElementSelect, ElementSelectByX, ElementSelectByColor, ChartIndex, Fisheye as ChartFisheye, Tooltip, LegendFilter, LegendHighlight, BrushHighlight, BrushXHighlight, BrushYHighlight, BrushAxisHighlight, BrushFilter, BrushXFilter, BrushYFilter, SliderFilter, Poptip, ScrollbarFilter } from '../interaction'; | ||
export declare function corelib(): { | ||
@@ -43,3 +43,2 @@ readonly 'data.fetch': import("../runtime").DataComponent<import("../data").FetchOptions>; | ||
readonly 'coordinate.polar': import("../runtime").CoordinateComponent<import("../coordinate").PolarOptions>; | ||
readonly 'coordinate.helix': import("../runtime").CoordinateComponent<import("..").HelixCoordinate>; | ||
readonly 'coordinate.transpose': import("../runtime").CoordinateComponent<import("../coordinate").TransposeOptions>; | ||
@@ -77,3 +76,2 @@ readonly 'coordinate.theta': import("../runtime").CoordinateComponent<import("..").ThetaCoordinate>; | ||
readonly 'mark.heatmap': import("../runtime").MarkComponent<import("../mark").HeatmapOptions>; | ||
readonly 'shape.label.label': import("../runtime").ShapeComponent<import("../shape").LabelShapeOptions>; | ||
readonly 'palette.category10': import("../runtime").PaletteComponent<import("../palette").Category10Options>; | ||
@@ -101,10 +99,4 @@ readonly 'palette.category20': import("../runtime").PaletteComponent<import("../palette").Category20Options>; | ||
readonly 'component.axisY': import("../runtime").GuideComponentComponent<import("../component/axis").AxisOptions>; | ||
readonly 'component.axisRadar': import("../runtime").GuideComponentComponent<import("../component/axisRadar").AxisRadarOptions>; | ||
readonly 'component.axisLinear': import("../runtime").GuideComponentComponent<import("../component/axis").AxisOptions>; | ||
readonly 'component.axisArc': import("../runtime").GuideComponentComponent<import("../component/axis").AxisOptions>; | ||
readonly 'component.legendCategory': import("../runtime").GuideComponentComponent<import("../component").LegendCategoryOptions>; | ||
readonly 'component.legendContinuous': import("../runtime").GuideComponentComponent<import("../component").LegendContinuousOptions>; | ||
readonly 'component.legendContinuousBlock': import("../runtime").GuideComponentComponent<import("../component").LegendContinuousOptions>; | ||
readonly 'component.legendContinuousBlockSize': import("../runtime").GuideComponentComponent<import("../component").LegendContinuousOptions>; | ||
readonly 'component.legendContinuousSize': import("../runtime").GuideComponentComponent<import("../component").LegendContinuousOptions>; | ||
readonly 'component.legends': import("../runtime").GuideComponentComponent<import("../component").LegendsOptions>; | ||
@@ -150,7 +142,4 @@ readonly 'component.title': import("../runtime").GuideComponentComponent<import("../runtime").G2Title>; | ||
readonly 'interaction.poptip': typeof Poptip; | ||
readonly 'interaction.event': typeof Event; | ||
readonly 'composition.spaceLayer': import("../runtime").CompositionComponent<import("../composition").SpaceLayerOptions>; | ||
readonly 'composition.spaceFlex': import("../runtime").CompositionComponent<import("../composition").SpaceFlexOptions>; | ||
readonly 'composition.mark': import("../runtime").CompositionComponent<import("../composition").MarkOptions>; | ||
readonly 'composition.view': import("../runtime").CompositionComponent<import("../composition").ViewOptions>; | ||
readonly 'composition.facetRect': import("../runtime").CompositionComponent<import("../composition").FacetRectOptions>; | ||
@@ -157,0 +146,0 @@ readonly 'composition.repeatMatrix': import("../runtime").CompositionComponent<import("..").RepeatMatrixComposition>; |
@@ -1,2 +0,2 @@ | ||
import { Cartesian, Polar, Helix, Transpose, Theta, Parallel, Fisheye, Radial, Radar, } from '../coordinate'; | ||
import { Cartesian, Polar, Transpose, Theta, Parallel, Fisheye, Radial, Radar, } from '../coordinate'; | ||
import { Constant, Field, Transform, Column } from '../encode'; | ||
@@ -7,10 +7,9 @@ import { Cell, Interval, Rect, Line, Point, Text, Area, Image, Polygon, Box, Vector, Link, LineX, LineY, Connector, Range, RangeX, RangeY, Path, Shape, Density, Heatmap, } from '../mark'; | ||
import { Classic, ClassicDark, Academy, Light } from '../theme'; | ||
import { AxisLinear, AxisArc, AxisX, AxisY, AxisRadar, LegendCategory, LegendContinuous, LegendContinuousBlock, LegendContinuousBlockSize, LegendContinuousSize, TitleComponent, SliderX, SliderY, ScrollbarX, ScrollbarY, Legends, } from '../component'; | ||
import { AxisX, AxisY, LegendCategory, LegendContinuous, TitleComponent, SliderX, SliderY, ScrollbarX, ScrollbarY, Legends, } from '../component'; | ||
import { ScaleInX, ScaleOutX, ScaleInY, ScaleOutY, WaveIn, FadeIn, FadeOut, Morphing, ZoomIn, ZoomOut, PathIn, GrowInX, GrowInY, } from '../animation'; | ||
import { ElementHighlight, ElementHighlightByX, ElementHighlightByColor, ElementSelect, ElementSelectByX, ElementSelectByColor, ChartIndex, Fisheye as ChartFisheye, Tooltip, LegendFilter, LegendHighlight, BrushHighlight, BrushXHighlight, BrushYHighlight, BrushAxisHighlight, BrushFilter, BrushXFilter, BrushYFilter, SliderFilter, Poptip, Event, ScrollbarFilter, } from '../interaction'; | ||
import { SpaceLayer, SpaceFlex, Mark, View, FacetRect, FacetCircle, RepeatMatrix, TimingKeyframe, } from '../composition'; | ||
import { ElementHighlight, ElementHighlightByX, ElementHighlightByColor, ElementSelect, ElementSelectByX, ElementSelectByColor, ChartIndex, Fisheye as ChartFisheye, Tooltip, LegendFilter, LegendHighlight, BrushHighlight, BrushXHighlight, BrushYHighlight, BrushAxisHighlight, BrushFilter, BrushXFilter, BrushYFilter, SliderFilter, Poptip, ScrollbarFilter, } from '../interaction'; | ||
import { SpaceLayer, SpaceFlex, FacetRect, FacetCircle, RepeatMatrix, TimingKeyframe, } from '../composition'; | ||
import { StackY, DodgeX, StackEnter, NormalizeY, Jitter, JitterX, SymmetryY, DiffY, Select, SelectX, SelectY, GroupX, Group, SortX, FlexX, SortY, GroupY, GroupColor, SortColor, Pack, BinX, Bin, Sample, Filter, } from '../transform'; | ||
import { Fetch as DataFetch, SortBy as DataSortBy, Filter as DataFilter, Map as DataMap, Pick as DataPick, Rename as DataRename, Fold as DataFold, Slice as DataSlice, Inline as DataInline, Custom as DataCustom, Join as DataJoin, Sort as DataSort, KDE as DataKDE, Log as DataLog, } from '../data'; | ||
import { OverlapDodgeY, OverflowHide, ContrastReverse, OverlapHide, } from '../label-transform'; | ||
import { LabelShape } from '../shape'; | ||
export function corelib() { | ||
@@ -58,3 +57,2 @@ return { | ||
'coordinate.polar': Polar, | ||
'coordinate.helix': Helix, | ||
'coordinate.transpose': Transpose, | ||
@@ -92,3 +90,2 @@ 'coordinate.theta': Theta, | ||
'mark.heatmap': Heatmap, | ||
'shape.label.label': LabelShape, | ||
'palette.category10': Category10, | ||
@@ -116,10 +113,4 @@ 'palette.category20': Category20, | ||
'component.axisY': AxisY, | ||
'component.axisRadar': AxisRadar, | ||
'component.axisLinear': AxisLinear, | ||
'component.axisArc': AxisArc, | ||
'component.legendCategory': LegendCategory, | ||
'component.legendContinuous': LegendContinuous, | ||
'component.legendContinuousBlock': LegendContinuousBlock, | ||
'component.legendContinuousBlockSize': LegendContinuousBlockSize, | ||
'component.legendContinuousSize': LegendContinuousSize, | ||
'component.legends': Legends, | ||
@@ -165,7 +156,4 @@ 'component.title': TitleComponent, | ||
'interaction.poptip': Poptip, | ||
'interaction.event': Event, | ||
'composition.spaceLayer': SpaceLayer, | ||
'composition.spaceFlex': SpaceFlex, | ||
'composition.mark': Mark, | ||
'composition.view': View, | ||
'composition.facetRect': FacetRect, | ||
@@ -172,0 +160,0 @@ 'composition.repeatMatrix': RepeatMatrix, |
export declare function graphlib(): { | ||
readonly 'data.arc': import("../runtime").DataComponent<import("../data").ArcOptions>; | ||
readonly 'data.cluster': import("../runtime").DataComponent<import("../data").ClusterOptions>; | ||
readonly 'mark.forceGraph': import("../runtime").CompositeMarkComponent<import("../mark").ForceGraphOptions>; | ||
readonly 'mark.tree': import("../runtime").CompositeMarkComponent<import("../mark").TreeOptions>; | ||
readonly 'mark.pack': import("../runtime").CompositionComponent<import("../mark").PackOptions>; | ||
readonly 'mark.sankey': import("../runtime").CompositeMarkComponent<import("../mark").SankeyOptions>; | ||
readonly 'mark.treemap': import("../runtime").CompositionComponent<import("../mark").TreemapOptions>; | ||
}; |
@@ -1,8 +0,14 @@ | ||
import { ForceGraph, Tree } from '../mark'; | ||
import { Sankey, Treemap, Pack, ForceGraph, Tree } from '../mark'; | ||
import { Arc, Cluster } from '../data'; | ||
export function graphlib() { | ||
return { | ||
'data.arc': Arc, | ||
'data.cluster': Cluster, | ||
'mark.forceGraph': ForceGraph, | ||
'mark.tree': Tree, | ||
'mark.pack': Pack, | ||
'mark.sankey': Sankey, | ||
'mark.treemap': Treemap, | ||
}; | ||
} | ||
//# sourceMappingURL=graph.js.map |
export declare function plotlib(): { | ||
readonly 'data.venn': import("../runtime").DataComponent<import("../data").VennOptions>; | ||
readonly 'data.arc': import("../runtime").DataComponent<import("../data").ArcOptions>; | ||
readonly 'data.cluster': import("../runtime").DataComponent<import("../data").ClusterOptions>; | ||
readonly 'mark.sankey': import("../runtime").CompositeMarkComponent<import("../mark").SankeyOptions>; | ||
readonly 'mark.treemap': import("../runtime").CompositionComponent<import("../mark").TreemapOptions>; | ||
readonly 'mark.boxplot': import("../runtime").CompositeMarkComponent<import("../mark/boxplot").BoxPlotOptions>; | ||
readonly 'mark.pack': import("../runtime").CompositionComponent<import("../mark").PackOptions>; | ||
readonly 'mark.gauge': import("../runtime").CompositeMarkComponent<import("../mark").GaugeOptions>; | ||
readonly 'mark.wordCloud': import("../runtime").CompositeMarkComponent<import("../mark").WordCloudOptions>; | ||
}; |
@@ -1,12 +0,7 @@ | ||
import { Sankey, Treemap, Pack, Boxplot, WordCloud, Gauge } from '../mark'; | ||
import { Arc, Cluster, Venn } from '../data'; | ||
import { Boxplot, WordCloud, Gauge } from '../mark'; | ||
import { Venn } from '../data'; | ||
export function plotlib() { | ||
return { | ||
'data.venn': Venn, | ||
'data.arc': Arc, | ||
'data.cluster': Cluster, | ||
'mark.sankey': Sankey, | ||
'mark.treemap': Treemap, | ||
'mark.boxplot': Boxplot, | ||
'mark.pack': Pack, | ||
'mark.gauge': Gauge, | ||
@@ -13,0 +8,0 @@ 'mark.wordCloud': WordCloud, |
@@ -42,3 +42,2 @@ export declare function stdlib(): { | ||
readonly 'coordinate.polar': import("../runtime").CoordinateComponent<import("../coordinate").PolarOptions>; | ||
readonly 'coordinate.helix': import("../runtime").CoordinateComponent<import("..").HelixCoordinate>; | ||
readonly 'coordinate.transpose': import("../runtime").CoordinateComponent<import("../coordinate").TransposeOptions>; | ||
@@ -76,3 +75,2 @@ readonly 'coordinate.theta': import("../runtime").CoordinateComponent<import("..").ThetaCoordinate>; | ||
readonly 'mark.heatmap': import("../runtime").MarkComponent<import("..").HeatmapOptions>; | ||
readonly 'shape.label.label': import("../runtime").ShapeComponent<import("../shape").LabelShapeOptions>; | ||
readonly 'palette.category10': import("../runtime").PaletteComponent<import("../palette").Category10Options>; | ||
@@ -100,10 +98,4 @@ readonly 'palette.category20': import("../runtime").PaletteComponent<import("../palette").Category20Options>; | ||
readonly 'component.axisY': import("../runtime").GuideComponentComponent<import("../component/axis").AxisOptions>; | ||
readonly 'component.axisRadar': import("../runtime").GuideComponentComponent<import("../component/axisRadar").AxisRadarOptions>; | ||
readonly 'component.axisLinear': import("../runtime").GuideComponentComponent<import("../component/axis").AxisOptions>; | ||
readonly 'component.axisArc': import("../runtime").GuideComponentComponent<import("../component/axis").AxisOptions>; | ||
readonly 'component.legendCategory': import("../runtime").GuideComponentComponent<import("../component").LegendCategoryOptions>; | ||
readonly 'component.legendContinuous': import("../runtime").GuideComponentComponent<import("../component").LegendContinuousOptions>; | ||
readonly 'component.legendContinuousBlock': import("../runtime").GuideComponentComponent<import("../component").LegendContinuousOptions>; | ||
readonly 'component.legendContinuousBlockSize': import("../runtime").GuideComponentComponent<import("../component").LegendContinuousOptions>; | ||
readonly 'component.legendContinuousSize': import("../runtime").GuideComponentComponent<import("../component").LegendContinuousOptions>; | ||
readonly 'component.legends': import("../runtime").GuideComponentComponent<import("../component").LegendsOptions>; | ||
@@ -149,7 +141,4 @@ readonly 'component.title': import("../runtime").GuideComponentComponent<import("../runtime").G2Title>; | ||
readonly 'interaction.poptip': typeof import("../interaction").Poptip; | ||
readonly 'interaction.event': typeof import("../interaction").Event; | ||
readonly 'composition.spaceLayer': import("../runtime").CompositionComponent<import("../composition").SpaceLayerOptions>; | ||
readonly 'composition.spaceFlex': import("../runtime").CompositionComponent<import("../composition").SpaceFlexOptions>; | ||
readonly 'composition.mark': import("../runtime").CompositionComponent<import("../composition").MarkOptions>; | ||
readonly 'composition.view': import("../runtime").CompositionComponent<import("../composition").ViewOptions>; | ||
readonly 'composition.facetRect': import("../runtime").CompositionComponent<import("../composition").FacetRectOptions>; | ||
@@ -164,14 +153,14 @@ readonly 'composition.repeatMatrix': import("../runtime").CompositionComponent<import("..").RepeatMatrixComposition>; | ||
readonly 'data.venn': import("../runtime").DataComponent<import("../data").VennOptions>; | ||
readonly 'data.arc': import("../runtime").DataComponent<import("../data").ArcOptions>; | ||
readonly 'data.cluster': import("../runtime").DataComponent<import("../data").ClusterOptions>; | ||
readonly 'mark.sankey': import("../runtime").CompositeMarkComponent<import("..").SankeyOptions>; | ||
readonly 'mark.treemap': import("../runtime").CompositionComponent<import("..").TreemapOptions>; | ||
readonly 'mark.boxplot': import("../runtime").CompositeMarkComponent<import("../mark/boxplot").BoxPlotOptions>; | ||
readonly 'mark.pack': import("../runtime").CompositionComponent<import("..").PackOptions>; | ||
readonly 'mark.gauge': import("../runtime").CompositeMarkComponent<import("..").GaugeOptions>; | ||
readonly 'mark.wordCloud': import("../runtime").CompositeMarkComponent<import("..").WordCloudOptions>; | ||
readonly 'data.arc': import("../runtime").DataComponent<import("../data").ArcOptions>; | ||
readonly 'data.cluster': import("../runtime").DataComponent<import("../data").ClusterOptions>; | ||
readonly 'mark.forceGraph': import("../runtime").CompositeMarkComponent<import("..").ForceGraphOptions>; | ||
readonly 'mark.tree': import("../runtime").CompositeMarkComponent<import("..").TreeOptions>; | ||
readonly 'mark.pack': import("../runtime").CompositionComponent<import("..").PackOptions>; | ||
readonly 'mark.sankey': import("../runtime").CompositeMarkComponent<import("..").SankeyOptions>; | ||
readonly 'mark.treemap': import("../runtime").CompositionComponent<import("..").TreemapOptions>; | ||
readonly 'composition.geoView': import("../runtime").CompositionComponent<import("../composition/geoView").GeoViewOptions>; | ||
readonly 'composition.geoPath': import("../runtime").CompositionComponent<import("../composition/geoPath").GeoPathOptions>; | ||
}; |
@@ -5,2 +5,3 @@ export declare function threedlib(): { | ||
readonly 'mark.point3D': import("../runtime").MarkComponent<import("../mark/point3D").PointOptions>; | ||
readonly 'mark.line3D': import("../runtime").MarkComponent<import("../mark/line3D").LineOptions>; | ||
}; |
import { Cartesian3D } from '../coordinate'; | ||
import { AxisZ } from '../component'; | ||
import { Point3D } from '../mark'; | ||
import { Point3D, Line3D } from '../mark'; | ||
export function threedlib() { | ||
@@ -9,4 +9,5 @@ return { | ||
'mark.point3D': Point3D, | ||
'mark.line3D': Line3D, | ||
}; | ||
} | ||
//# sourceMappingURL=threed.js.map |
export { Interval } from './interval'; | ||
export { Rect } from './rect'; | ||
export { Line } from './line'; | ||
export { Line3D } from './line3D'; | ||
export { Point } from './point'; | ||
@@ -5,0 +6,0 @@ export { Point3D } from './point3D'; |
export { Interval } from './interval'; | ||
export { Rect } from './rect'; | ||
export { Line } from './line'; | ||
export { Line3D } from './line3D'; | ||
export { Point } from './point'; | ||
@@ -5,0 +6,0 @@ export { Point3D } from './point3D'; |
@@ -159,2 +159,3 @@ import { ascending, group, max, min, sum } from 'd3-array'; | ||
const key = `padding${capitalizeFirst(camelCase(position))}`; | ||
const insetKey = `inset${capitalizeFirst(camelCase(position))}`; | ||
const components = positionComponents.get(position) || []; | ||
@@ -161,0 +162,0 @@ const value = layout[key]; |
import { IDocument } from '@antv/g'; | ||
import { G2ComponentOptions, G2Context, G2Library } from './types/options'; | ||
import { G2Component, G2ComponentNamespaces, G2ComponentValue } from './types/component'; | ||
export declare function useLibrary<O extends G2ComponentOptions, C extends G2Component, V extends G2ComponentValue>(namespace: G2ComponentNamespaces, library: G2Library): [(options: O, context?: any) => V, (type: O['type']) => C]; | ||
export declare function useLibrary<O extends G2ComponentOptions, C extends G2Component, V extends G2ComponentValue>(namespace: G2ComponentNamespaces, publicLibrary: G2Library): [(options: O, context?: any) => V, (type: O['type']) => C]; | ||
export declare function documentOf(library: G2Context): IDocument; |
@@ -13,3 +13,5 @@ var __rest = (this && this.__rest) || function (s, e) { | ||
import { error } from '../utils/helper'; | ||
export function useLibrary(namespace, library) { | ||
import { builtinlib } from '../lib/builtinlib'; | ||
export function useLibrary(namespace, publicLibrary) { | ||
const library = Object.assign(Object.assign({}, builtinlib()), publicLibrary); | ||
const create = (type) => { | ||
@@ -16,0 +18,0 @@ if (typeof type !== 'string') |
@@ -64,3 +64,3 @@ import { Canvas as GCanvas, Group } from '@antv/g'; | ||
// Initialize the context if it is not provided. | ||
const { width = 640, height = 480, depth = 0, theme } = options; | ||
const { width = 640, height = 480, depth = 0 } = options; | ||
const keyed = inferKeys(options); | ||
@@ -67,0 +67,0 @@ const { canvas = Canvas(width, height), emitter = new EventEmitter(), library, } = context; |
@@ -13,2 +13,3 @@ export { Rect as IntervalShape } from './interval/rect'; | ||
export { Trail as LineTrail } from './line/trail'; | ||
export { Line as Line3DShape } from './line3D/line'; | ||
export { HollowBowtie as PointHollowBowtie } from './point/hollowBowtie'; | ||
@@ -15,0 +16,0 @@ export { HollowDiamond as PointHollowDiamond } from './point/hollowDiamond'; |
@@ -13,2 +13,3 @@ export { Rect as IntervalShape } from './interval/rect'; | ||
export { Trail as LineTrail } from './line/trail'; | ||
export { Line as Line3DShape } from './line3D/line'; | ||
export { HollowBowtie as PointHollowBowtie } from './point/hollowBowtie'; | ||
@@ -15,0 +16,0 @@ export { HollowDiamond as PointHollowDiamond } from './point/hollowDiamond'; |
@@ -12,3 +12,3 @@ var __rest = (this && this.__rest) || function (s, e) { | ||
}; | ||
import { MeshPhongMaterial, CubeGeometry, Mesh } from '@antv/g-plugin-3d'; | ||
import { MeshLambertMaterial, CubeGeometry, Mesh } from '@antv/g-plugin-3d'; | ||
import { applyStyle, getOrigin, toOpacityKey } from '../utils'; | ||
@@ -37,3 +37,3 @@ import { select } from '../../utils/selection'; | ||
// @ts-ignore | ||
context.cubeMaterial = new MeshPhongMaterial(device); | ||
context.cubeMaterial = new MeshLambertMaterial(device); | ||
} | ||
@@ -40,0 +40,0 @@ return (points, value, defaults) => { |
@@ -12,3 +12,3 @@ var __rest = (this && this.__rest) || function (s, e) { | ||
}; | ||
import { MeshPhongMaterial, SphereGeometry, Mesh } from '@antv/g-plugin-3d'; | ||
import { MeshLambertMaterial, SphereGeometry, Mesh } from '@antv/g-plugin-3d'; | ||
import { applyStyle, getOrigin, toOpacityKey } from '../utils'; | ||
@@ -37,3 +37,3 @@ import { select } from '../../utils/selection'; | ||
// @ts-ignore | ||
context.sphereMaterial = new MeshPhongMaterial(device); | ||
context.sphereMaterial = new MeshLambertMaterial(device); | ||
} | ||
@@ -40,0 +40,0 @@ return (points, value, defaults) => { |
@@ -234,2 +234,4 @@ const COLORS = { | ||
titleTransformOrigin: 'center', | ||
lineArrowOffset: 6, | ||
lineArrowSize: 6, | ||
}, | ||
@@ -236,0 +238,0 @@ axisTop: { |
@@ -5,3 +5,3 @@ const COLORS = { | ||
STROKE: '#416180', | ||
DEFAULT: '#5B8FF9', | ||
DEFAULT: '#1783FF', | ||
BACKGROUND: 'transparent', | ||
@@ -8,0 +8,0 @@ }; |
@@ -48,3 +48,2 @@ import { G2Spec } from '../spec'; | ||
readonly 'coordinate.polar': import("../runtime").CoordinateComponent<import("../coordinate").PolarOptions>; | ||
readonly 'coordinate.helix': import("../runtime").CoordinateComponent<import("../spec").HelixCoordinate>; | ||
readonly 'coordinate.transpose': import("../runtime").CoordinateComponent<import("../coordinate").TransposeOptions>; | ||
@@ -82,3 +81,2 @@ readonly 'coordinate.theta': import("../runtime").CoordinateComponent<import("../spec").ThetaCoordinate>; | ||
readonly 'mark.heatmap': import("../runtime").MarkComponent<import("..").HeatmapOptions>; | ||
readonly 'shape.label.label': import("../runtime").ShapeComponent<import("../shape").LabelShapeOptions>; | ||
readonly 'palette.category10': import("../runtime").PaletteComponent<import("../palette").Category10Options>; | ||
@@ -106,10 +104,4 @@ readonly 'palette.category20': import("../runtime").PaletteComponent<import("../palette").Category20Options>; | ||
readonly 'component.axisY': import("../runtime").GuideComponentComponent<import("../component/axis").AxisOptions>; | ||
readonly 'component.axisRadar': import("../runtime").GuideComponentComponent<import("../component/axisRadar").AxisRadarOptions>; | ||
readonly 'component.axisLinear': import("../runtime").GuideComponentComponent<import("../component/axis").AxisOptions>; | ||
readonly 'component.axisArc': import("../runtime").GuideComponentComponent<import("../component/axis").AxisOptions>; | ||
readonly 'component.legendCategory': import("../runtime").GuideComponentComponent<import("../component").LegendCategoryOptions>; | ||
readonly 'component.legendContinuous': import("../runtime").GuideComponentComponent<import("../component").LegendContinuousOptions>; | ||
readonly 'component.legendContinuousBlock': import("../runtime").GuideComponentComponent<import("../component").LegendContinuousOptions>; | ||
readonly 'component.legendContinuousBlockSize': import("../runtime").GuideComponentComponent<import("../component").LegendContinuousOptions>; | ||
readonly 'component.legendContinuousSize': import("../runtime").GuideComponentComponent<import("../component").LegendContinuousOptions>; | ||
readonly 'component.legends': import("../runtime").GuideComponentComponent<import("../component").LegendsOptions>; | ||
@@ -155,7 +147,4 @@ readonly 'component.title': import("../runtime").GuideComponentComponent<import("../runtime").G2Title>; | ||
readonly 'interaction.poptip': typeof import("../interaction").Poptip; | ||
readonly 'interaction.event': typeof import("../interaction").Event; | ||
readonly 'composition.spaceLayer': import("../runtime").CompositionComponent<import("../composition").SpaceLayerOptions>; | ||
readonly 'composition.spaceFlex': import("../runtime").CompositionComponent<import("../composition").SpaceFlexOptions>; | ||
readonly 'composition.mark': import("../runtime").CompositionComponent<import("../composition").MarkOptions>; | ||
readonly 'composition.view': import("../runtime").CompositionComponent<import("../composition").ViewOptions>; | ||
readonly 'composition.facetRect': import("../runtime").CompositionComponent<import("../composition").FacetRectOptions>; | ||
@@ -170,12 +159,12 @@ readonly 'composition.repeatMatrix': import("../runtime").CompositionComponent<import("../spec").RepeatMatrixComposition>; | ||
readonly 'data.venn': import("../runtime").DataComponent<import("../data").VennOptions>; | ||
readonly 'data.arc': import("../runtime").DataComponent<import("../data").ArcOptions>; | ||
readonly 'data.cluster': import("../runtime").DataComponent<import("../data").ClusterOptions>; | ||
readonly 'mark.sankey': import("../runtime").CompositeMarkComponent<import("..").SankeyOptions>; | ||
readonly 'mark.treemap': import("../runtime").CompositionComponent<import("..").TreemapOptions>; | ||
readonly 'mark.boxplot': import("../runtime").CompositeMarkComponent<import("../mark/boxplot").BoxPlotOptions>; | ||
readonly 'mark.pack': import("../runtime").CompositionComponent<import("..").PackOptions>; | ||
readonly 'mark.gauge': import("../runtime").CompositeMarkComponent<import("..").GaugeOptions>; | ||
readonly 'mark.wordCloud': import("../runtime").CompositeMarkComponent<import("..").WordCloudOptions>; | ||
readonly 'data.arc': import("../runtime").DataComponent<import("../data").ArcOptions>; | ||
readonly 'data.cluster': import("../runtime").DataComponent<import("../data").ClusterOptions>; | ||
readonly 'mark.forceGraph': import("../runtime").CompositeMarkComponent<import("..").ForceGraphOptions>; | ||
readonly 'mark.tree': import("../runtime").CompositeMarkComponent<import("..").TreeOptions>; | ||
readonly 'mark.pack': import("../runtime").CompositionComponent<import("..").PackOptions>; | ||
readonly 'mark.sankey': import("../runtime").CompositeMarkComponent<import("..").SankeyOptions>; | ||
readonly 'mark.treemap': import("../runtime").CompositionComponent<import("..").TreemapOptions>; | ||
readonly 'composition.geoView': import("../runtime").CompositionComponent<import("../composition/geoView").GeoViewOptions>; | ||
@@ -182,0 +171,0 @@ readonly 'composition.geoPath': import("../runtime").CompositionComponent<import("../composition/geoPath").GeoPathOptions>; |
@@ -8,4 +8,8 @@ import { G2Spec } from '../spec'; | ||
type CompositionOf<Library> = Of<Library, (composite?: any) => CompositionNode<CompositionOf<Library> & MarkOf<Library, (composite?: any) => MarkNode>> & MarkOf<Library, (composite?: any) => MarkNode> & CompositionOf<Library>>; | ||
export type API<Spec, Library> = Runtime<Spec> & MarkOf<Library, (composite?: any) => MarkNode> & CompositionOf<Library>; | ||
type BuiltinComposition = { | ||
'composition.mark': any; | ||
'composition.view': any; | ||
}; | ||
export type API<Spec, Library> = Runtime<Spec> & MarkOf<Library, (composite?: any) => MarkNode> & CompositionOf<Library & BuiltinComposition>; | ||
export declare function extend<Spec extends G2Spec = G2Spec, Library extends G2Library = G2Library>(Runtime: new (options: RuntimeOptions) => Runtime<Spec>, library: Library): new (options?: RuntimeOptions) => API<Spec, Library>; | ||
export {}; |
@@ -43,3 +43,2 @@ import { G2ComponentNamespaces, G2Component } from '../runtime'; | ||
readonly 'coordinate.polar': import("../runtime").CoordinateComponent<import("../coordinate").PolarOptions>; | ||
readonly 'coordinate.helix': import("../runtime").CoordinateComponent<import("..").HelixCoordinate>; | ||
readonly 'coordinate.transpose': import("../runtime").CoordinateComponent<import("../coordinate").TransposeOptions>; | ||
@@ -77,3 +76,2 @@ readonly 'coordinate.theta': import("../runtime").CoordinateComponent<import("..").ThetaCoordinate>; | ||
readonly 'mark.heatmap': import("../runtime").MarkComponent<import("..").HeatmapOptions>; | ||
readonly 'shape.label.label': import("../runtime").ShapeComponent<import("../shape").LabelShapeOptions>; | ||
readonly 'palette.category10': import("../runtime").PaletteComponent<import("../palette").Category10Options>; | ||
@@ -101,10 +99,4 @@ readonly 'palette.category20': import("../runtime").PaletteComponent<import("../palette").Category20Options>; | ||
readonly 'component.axisY': import("../runtime").GuideComponentComponent<import("../component/axis").AxisOptions>; | ||
readonly 'component.axisRadar': import("../runtime").GuideComponentComponent<import("../component/axisRadar").AxisRadarOptions>; | ||
readonly 'component.axisLinear': import("../runtime").GuideComponentComponent<import("../component/axis").AxisOptions>; | ||
readonly 'component.axisArc': import("../runtime").GuideComponentComponent<import("../component/axis").AxisOptions>; | ||
readonly 'component.legendCategory': import("../runtime").GuideComponentComponent<import("../component").LegendCategoryOptions>; | ||
readonly 'component.legendContinuous': import("../runtime").GuideComponentComponent<import("../component").LegendContinuousOptions>; | ||
readonly 'component.legendContinuousBlock': import("../runtime").GuideComponentComponent<import("../component").LegendContinuousOptions>; | ||
readonly 'component.legendContinuousBlockSize': import("../runtime").GuideComponentComponent<import("../component").LegendContinuousOptions>; | ||
readonly 'component.legendContinuousSize': import("../runtime").GuideComponentComponent<import("../component").LegendContinuousOptions>; | ||
readonly 'component.legends': import("../runtime").GuideComponentComponent<import("../component").LegendsOptions>; | ||
@@ -150,7 +142,4 @@ readonly 'component.title': import("../runtime").GuideComponentComponent<import("../runtime").G2Title>; | ||
readonly 'interaction.poptip': typeof import("../interaction").Poptip; | ||
readonly 'interaction.event': typeof import("../interaction").Event; | ||
readonly 'composition.spaceLayer': import("../runtime").CompositionComponent<import("../composition").SpaceLayerOptions>; | ||
readonly 'composition.spaceFlex': import("../runtime").CompositionComponent<import("../composition").SpaceFlexOptions>; | ||
readonly 'composition.mark': import("../runtime").CompositionComponent<import("../composition").MarkOptions>; | ||
readonly 'composition.view': import("../runtime").CompositionComponent<import("../composition").ViewOptions>; | ||
readonly 'composition.facetRect': import("../runtime").CompositionComponent<import("../composition").FacetRectOptions>; | ||
@@ -165,12 +154,12 @@ readonly 'composition.repeatMatrix': import("../runtime").CompositionComponent<import("..").RepeatMatrixComposition>; | ||
readonly 'data.venn': import("../runtime").DataComponent<import("../data").VennOptions>; | ||
readonly 'data.arc': import("../runtime").DataComponent<import("../data").ArcOptions>; | ||
readonly 'data.cluster': import("../runtime").DataComponent<import("../data").ClusterOptions>; | ||
readonly 'mark.sankey': import("../runtime").CompositeMarkComponent<import("..").SankeyOptions>; | ||
readonly 'mark.treemap': import("../runtime").CompositionComponent<import("..").TreemapOptions>; | ||
readonly 'mark.boxplot': import("../runtime").CompositeMarkComponent<import("../mark/boxplot").BoxPlotOptions>; | ||
readonly 'mark.pack': import("../runtime").CompositionComponent<import("..").PackOptions>; | ||
readonly 'mark.gauge': import("../runtime").CompositeMarkComponent<import("..").GaugeOptions>; | ||
readonly 'mark.wordCloud': import("../runtime").CompositeMarkComponent<import("..").WordCloudOptions>; | ||
readonly 'data.arc': import("../runtime").DataComponent<import("../data").ArcOptions>; | ||
readonly 'data.cluster': import("../runtime").DataComponent<import("../data").ClusterOptions>; | ||
readonly 'mark.forceGraph': import("../runtime").CompositeMarkComponent<import("..").ForceGraphOptions>; | ||
readonly 'mark.tree': import("../runtime").CompositeMarkComponent<import("..").TreeOptions>; | ||
readonly 'mark.pack': import("../runtime").CompositionComponent<import("..").PackOptions>; | ||
readonly 'mark.sankey': import("../runtime").CompositeMarkComponent<import("..").SankeyOptions>; | ||
readonly 'mark.treemap': import("../runtime").CompositionComponent<import("..").TreemapOptions>; | ||
readonly 'composition.geoView': import("../runtime").CompositionComponent<import("../composition/geoView").GeoViewOptions>; | ||
@@ -177,0 +166,0 @@ readonly 'composition.geoPath': import("../runtime").CompositionComponent<import("../composition/geoPath").GeoPathOptions>; |
@@ -181,3 +181,6 @@ "use strict"; | ||
// Create composition generators. | ||
const compositions = Object.keys(library).filter((key) => key.startsWith('composition.') && key !== 'composition.mark'); | ||
const compositions = [ | ||
'composition.view', | ||
...Object.keys(library).filter((key) => key.startsWith('composition.') && key !== 'composition.mark'), | ||
]; | ||
this._compositions = Object.fromEntries(compositions.map((key) => { | ||
@@ -184,0 +187,0 @@ const name = key.split('.').pop(); |
@@ -1,2 +0,2 @@ | ||
import { ElementHighlight, ElementHighlightByX, ElementHighlightByColor, ElementSelect, ElementSelectByX, ElementSelectByColor, ChartIndex, Fisheye as ChartFisheye, Tooltip, LegendFilter, LegendHighlight, BrushHighlight, BrushXHighlight, BrushYHighlight, BrushAxisHighlight, BrushFilter, BrushXFilter, BrushYFilter, SliderFilter, Poptip, Event, ScrollbarFilter } from '../interaction'; | ||
import { ElementHighlight, ElementHighlightByX, ElementHighlightByColor, ElementSelect, ElementSelectByX, ElementSelectByColor, ChartIndex, Fisheye as ChartFisheye, Tooltip, LegendFilter, LegendHighlight, BrushHighlight, BrushXHighlight, BrushYHighlight, BrushAxisHighlight, BrushFilter, BrushXFilter, BrushYFilter, SliderFilter, Poptip, ScrollbarFilter } from '../interaction'; | ||
export declare function corelib(): { | ||
@@ -43,3 +43,2 @@ readonly 'data.fetch': import("../runtime").DataComponent<import("../data").FetchOptions>; | ||
readonly 'coordinate.polar': import("../runtime").CoordinateComponent<import("../coordinate").PolarOptions>; | ||
readonly 'coordinate.helix': import("../runtime").CoordinateComponent<import("..").HelixCoordinate>; | ||
readonly 'coordinate.transpose': import("../runtime").CoordinateComponent<import("../coordinate").TransposeOptions>; | ||
@@ -77,3 +76,2 @@ readonly 'coordinate.theta': import("../runtime").CoordinateComponent<import("..").ThetaCoordinate>; | ||
readonly 'mark.heatmap': import("../runtime").MarkComponent<import("../mark").HeatmapOptions>; | ||
readonly 'shape.label.label': import("../runtime").ShapeComponent<import("../shape").LabelShapeOptions>; | ||
readonly 'palette.category10': import("../runtime").PaletteComponent<import("../palette").Category10Options>; | ||
@@ -101,10 +99,4 @@ readonly 'palette.category20': import("../runtime").PaletteComponent<import("../palette").Category20Options>; | ||
readonly 'component.axisY': import("../runtime").GuideComponentComponent<import("../component/axis").AxisOptions>; | ||
readonly 'component.axisRadar': import("../runtime").GuideComponentComponent<import("../component/axisRadar").AxisRadarOptions>; | ||
readonly 'component.axisLinear': import("../runtime").GuideComponentComponent<import("../component/axis").AxisOptions>; | ||
readonly 'component.axisArc': import("../runtime").GuideComponentComponent<import("../component/axis").AxisOptions>; | ||
readonly 'component.legendCategory': import("../runtime").GuideComponentComponent<import("../component").LegendCategoryOptions>; | ||
readonly 'component.legendContinuous': import("../runtime").GuideComponentComponent<import("../component").LegendContinuousOptions>; | ||
readonly 'component.legendContinuousBlock': import("../runtime").GuideComponentComponent<import("../component").LegendContinuousOptions>; | ||
readonly 'component.legendContinuousBlockSize': import("../runtime").GuideComponentComponent<import("../component").LegendContinuousOptions>; | ||
readonly 'component.legendContinuousSize': import("../runtime").GuideComponentComponent<import("../component").LegendContinuousOptions>; | ||
readonly 'component.legends': import("../runtime").GuideComponentComponent<import("../component").LegendsOptions>; | ||
@@ -150,7 +142,4 @@ readonly 'component.title': import("../runtime").GuideComponentComponent<import("../runtime").G2Title>; | ||
readonly 'interaction.poptip': typeof Poptip; | ||
readonly 'interaction.event': typeof Event; | ||
readonly 'composition.spaceLayer': import("../runtime").CompositionComponent<import("../composition").SpaceLayerOptions>; | ||
readonly 'composition.spaceFlex': import("../runtime").CompositionComponent<import("../composition").SpaceFlexOptions>; | ||
readonly 'composition.mark': import("../runtime").CompositionComponent<import("../composition").MarkOptions>; | ||
readonly 'composition.view': import("../runtime").CompositionComponent<import("../composition").ViewOptions>; | ||
readonly 'composition.facetRect': import("../runtime").CompositionComponent<import("../composition").FacetRectOptions>; | ||
@@ -157,0 +146,0 @@ readonly 'composition.repeatMatrix': import("../runtime").CompositionComponent<import("..").RepeatMatrixComposition>; |
@@ -17,3 +17,2 @@ "use strict"; | ||
const label_transform_1 = require("../label-transform"); | ||
const shape_1 = require("../shape"); | ||
function corelib() { | ||
@@ -61,3 +60,2 @@ return { | ||
'coordinate.polar': coordinate_1.Polar, | ||
'coordinate.helix': coordinate_1.Helix, | ||
'coordinate.transpose': coordinate_1.Transpose, | ||
@@ -95,3 +93,2 @@ 'coordinate.theta': coordinate_1.Theta, | ||
'mark.heatmap': mark_1.Heatmap, | ||
'shape.label.label': shape_1.LabelShape, | ||
'palette.category10': palette_1.Category10, | ||
@@ -119,10 +116,4 @@ 'palette.category20': palette_1.Category20, | ||
'component.axisY': component_1.AxisY, | ||
'component.axisRadar': component_1.AxisRadar, | ||
'component.axisLinear': component_1.AxisLinear, | ||
'component.axisArc': component_1.AxisArc, | ||
'component.legendCategory': component_1.LegendCategory, | ||
'component.legendContinuous': component_1.LegendContinuous, | ||
'component.legendContinuousBlock': component_1.LegendContinuousBlock, | ||
'component.legendContinuousBlockSize': component_1.LegendContinuousBlockSize, | ||
'component.legendContinuousSize': component_1.LegendContinuousSize, | ||
'component.legends': component_1.Legends, | ||
@@ -168,7 +159,4 @@ 'component.title': component_1.TitleComponent, | ||
'interaction.poptip': interaction_1.Poptip, | ||
'interaction.event': interaction_1.Event, | ||
'composition.spaceLayer': composition_1.SpaceLayer, | ||
'composition.spaceFlex': composition_1.SpaceFlex, | ||
'composition.mark': composition_1.Mark, | ||
'composition.view': composition_1.View, | ||
'composition.facetRect': composition_1.FacetRect, | ||
@@ -175,0 +163,0 @@ 'composition.repeatMatrix': composition_1.RepeatMatrix, |
export declare function graphlib(): { | ||
readonly 'data.arc': import("../runtime").DataComponent<import("../data").ArcOptions>; | ||
readonly 'data.cluster': import("../runtime").DataComponent<import("../data").ClusterOptions>; | ||
readonly 'mark.forceGraph': import("../runtime").CompositeMarkComponent<import("../mark").ForceGraphOptions>; | ||
readonly 'mark.tree': import("../runtime").CompositeMarkComponent<import("../mark").TreeOptions>; | ||
readonly 'mark.pack': import("../runtime").CompositionComponent<import("../mark").PackOptions>; | ||
readonly 'mark.sankey': import("../runtime").CompositeMarkComponent<import("../mark").SankeyOptions>; | ||
readonly 'mark.treemap': import("../runtime").CompositionComponent<import("../mark").TreemapOptions>; | ||
}; |
@@ -5,6 +5,12 @@ "use strict"; | ||
const mark_1 = require("../mark"); | ||
const data_1 = require("../data"); | ||
function graphlib() { | ||
return { | ||
'data.arc': data_1.Arc, | ||
'data.cluster': data_1.Cluster, | ||
'mark.forceGraph': mark_1.ForceGraph, | ||
'mark.tree': mark_1.Tree, | ||
'mark.pack': mark_1.Pack, | ||
'mark.sankey': mark_1.Sankey, | ||
'mark.treemap': mark_1.Treemap, | ||
}; | ||
@@ -11,0 +17,0 @@ } |
export declare function plotlib(): { | ||
readonly 'data.venn': import("../runtime").DataComponent<import("../data").VennOptions>; | ||
readonly 'data.arc': import("../runtime").DataComponent<import("../data").ArcOptions>; | ||
readonly 'data.cluster': import("../runtime").DataComponent<import("../data").ClusterOptions>; | ||
readonly 'mark.sankey': import("../runtime").CompositeMarkComponent<import("../mark").SankeyOptions>; | ||
readonly 'mark.treemap': import("../runtime").CompositionComponent<import("../mark").TreemapOptions>; | ||
readonly 'mark.boxplot': import("../runtime").CompositeMarkComponent<import("../mark/boxplot").BoxPlotOptions>; | ||
readonly 'mark.pack': import("../runtime").CompositionComponent<import("../mark").PackOptions>; | ||
readonly 'mark.gauge': import("../runtime").CompositeMarkComponent<import("../mark").GaugeOptions>; | ||
readonly 'mark.wordCloud': import("../runtime").CompositeMarkComponent<import("../mark").WordCloudOptions>; | ||
}; |
@@ -9,8 +9,3 @@ "use strict"; | ||
'data.venn': data_1.Venn, | ||
'data.arc': data_1.Arc, | ||
'data.cluster': data_1.Cluster, | ||
'mark.sankey': mark_1.Sankey, | ||
'mark.treemap': mark_1.Treemap, | ||
'mark.boxplot': mark_1.Boxplot, | ||
'mark.pack': mark_1.Pack, | ||
'mark.gauge': mark_1.Gauge, | ||
@@ -17,0 +12,0 @@ 'mark.wordCloud': mark_1.WordCloud, |
@@ -42,3 +42,2 @@ export declare function stdlib(): { | ||
readonly 'coordinate.polar': import("../runtime").CoordinateComponent<import("../coordinate").PolarOptions>; | ||
readonly 'coordinate.helix': import("../runtime").CoordinateComponent<import("..").HelixCoordinate>; | ||
readonly 'coordinate.transpose': import("../runtime").CoordinateComponent<import("../coordinate").TransposeOptions>; | ||
@@ -76,3 +75,2 @@ readonly 'coordinate.theta': import("../runtime").CoordinateComponent<import("..").ThetaCoordinate>; | ||
readonly 'mark.heatmap': import("../runtime").MarkComponent<import("..").HeatmapOptions>; | ||
readonly 'shape.label.label': import("../runtime").ShapeComponent<import("../shape").LabelShapeOptions>; | ||
readonly 'palette.category10': import("../runtime").PaletteComponent<import("../palette").Category10Options>; | ||
@@ -100,10 +98,4 @@ readonly 'palette.category20': import("../runtime").PaletteComponent<import("../palette").Category20Options>; | ||
readonly 'component.axisY': import("../runtime").GuideComponentComponent<import("../component/axis").AxisOptions>; | ||
readonly 'component.axisRadar': import("../runtime").GuideComponentComponent<import("../component/axisRadar").AxisRadarOptions>; | ||
readonly 'component.axisLinear': import("../runtime").GuideComponentComponent<import("../component/axis").AxisOptions>; | ||
readonly 'component.axisArc': import("../runtime").GuideComponentComponent<import("../component/axis").AxisOptions>; | ||
readonly 'component.legendCategory': import("../runtime").GuideComponentComponent<import("../component").LegendCategoryOptions>; | ||
readonly 'component.legendContinuous': import("../runtime").GuideComponentComponent<import("../component").LegendContinuousOptions>; | ||
readonly 'component.legendContinuousBlock': import("../runtime").GuideComponentComponent<import("../component").LegendContinuousOptions>; | ||
readonly 'component.legendContinuousBlockSize': import("../runtime").GuideComponentComponent<import("../component").LegendContinuousOptions>; | ||
readonly 'component.legendContinuousSize': import("../runtime").GuideComponentComponent<import("../component").LegendContinuousOptions>; | ||
readonly 'component.legends': import("../runtime").GuideComponentComponent<import("../component").LegendsOptions>; | ||
@@ -149,7 +141,4 @@ readonly 'component.title': import("../runtime").GuideComponentComponent<import("../runtime").G2Title>; | ||
readonly 'interaction.poptip': typeof import("../interaction").Poptip; | ||
readonly 'interaction.event': typeof import("../interaction").Event; | ||
readonly 'composition.spaceLayer': import("../runtime").CompositionComponent<import("../composition").SpaceLayerOptions>; | ||
readonly 'composition.spaceFlex': import("../runtime").CompositionComponent<import("../composition").SpaceFlexOptions>; | ||
readonly 'composition.mark': import("../runtime").CompositionComponent<import("../composition").MarkOptions>; | ||
readonly 'composition.view': import("../runtime").CompositionComponent<import("../composition").ViewOptions>; | ||
readonly 'composition.facetRect': import("../runtime").CompositionComponent<import("../composition").FacetRectOptions>; | ||
@@ -164,14 +153,14 @@ readonly 'composition.repeatMatrix': import("../runtime").CompositionComponent<import("..").RepeatMatrixComposition>; | ||
readonly 'data.venn': import("../runtime").DataComponent<import("../data").VennOptions>; | ||
readonly 'data.arc': import("../runtime").DataComponent<import("../data").ArcOptions>; | ||
readonly 'data.cluster': import("../runtime").DataComponent<import("../data").ClusterOptions>; | ||
readonly 'mark.sankey': import("../runtime").CompositeMarkComponent<import("..").SankeyOptions>; | ||
readonly 'mark.treemap': import("../runtime").CompositionComponent<import("..").TreemapOptions>; | ||
readonly 'mark.boxplot': import("../runtime").CompositeMarkComponent<import("../mark/boxplot").BoxPlotOptions>; | ||
readonly 'mark.pack': import("../runtime").CompositionComponent<import("..").PackOptions>; | ||
readonly 'mark.gauge': import("../runtime").CompositeMarkComponent<import("..").GaugeOptions>; | ||
readonly 'mark.wordCloud': import("../runtime").CompositeMarkComponent<import("..").WordCloudOptions>; | ||
readonly 'data.arc': import("../runtime").DataComponent<import("../data").ArcOptions>; | ||
readonly 'data.cluster': import("../runtime").DataComponent<import("../data").ClusterOptions>; | ||
readonly 'mark.forceGraph': import("../runtime").CompositeMarkComponent<import("..").ForceGraphOptions>; | ||
readonly 'mark.tree': import("../runtime").CompositeMarkComponent<import("..").TreeOptions>; | ||
readonly 'mark.pack': import("../runtime").CompositionComponent<import("..").PackOptions>; | ||
readonly 'mark.sankey': import("../runtime").CompositeMarkComponent<import("..").SankeyOptions>; | ||
readonly 'mark.treemap': import("../runtime").CompositionComponent<import("..").TreemapOptions>; | ||
readonly 'composition.geoView': import("../runtime").CompositionComponent<import("../composition/geoView").GeoViewOptions>; | ||
readonly 'composition.geoPath': import("../runtime").CompositionComponent<import("../composition/geoPath").GeoPathOptions>; | ||
}; |
@@ -5,2 +5,3 @@ export declare function threedlib(): { | ||
readonly 'mark.point3D': import("../runtime").MarkComponent<import("../mark/point3D").PointOptions>; | ||
readonly 'mark.line3D': import("../runtime").MarkComponent<import("../mark/line3D").LineOptions>; | ||
}; |
@@ -12,2 +12,3 @@ "use strict"; | ||
'mark.point3D': mark_1.Point3D, | ||
'mark.line3D': mark_1.Line3D, | ||
}; | ||
@@ -14,0 +15,0 @@ } |
export { Interval } from './interval'; | ||
export { Rect } from './rect'; | ||
export { Line } from './line'; | ||
export { Line3D } from './line3D'; | ||
export { Point } from './point'; | ||
@@ -5,0 +6,0 @@ export { Point3D } from './point3D'; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Heatmap = exports.Density = exports.Gauge = exports.WordCloud = exports.Tree = exports.ForceGraph = exports.Shape = exports.Boxplot = exports.Pack = exports.Treemap = exports.Path = exports.Sankey = exports.RangeY = exports.RangeX = exports.Range = exports.Connector = exports.LineX = exports.LineY = exports.Vector = exports.Box = exports.Polygon = exports.Image = exports.Link = exports.Area = exports.Cell = exports.Text = exports.Point3D = exports.Point = exports.Line = exports.Rect = exports.Interval = void 0; | ||
exports.Heatmap = exports.Density = exports.Gauge = exports.WordCloud = exports.Tree = exports.ForceGraph = exports.Shape = exports.Boxplot = exports.Pack = exports.Treemap = exports.Path = exports.Sankey = exports.RangeY = exports.RangeX = exports.Range = exports.Connector = exports.LineX = exports.LineY = exports.Vector = exports.Box = exports.Polygon = exports.Image = exports.Link = exports.Area = exports.Cell = exports.Text = exports.Point3D = exports.Point = exports.Line3D = exports.Line = exports.Rect = exports.Interval = void 0; | ||
var interval_1 = require("./interval"); | ||
@@ -10,2 +10,4 @@ Object.defineProperty(exports, "Interval", { enumerable: true, get: function () { return interval_1.Interval; } }); | ||
Object.defineProperty(exports, "Line", { enumerable: true, get: function () { return line_1.Line; } }); | ||
var line3D_1 = require("./line3D"); | ||
Object.defineProperty(exports, "Line3D", { enumerable: true, get: function () { return line3D_1.Line3D; } }); | ||
var point_1 = require("./point"); | ||
@@ -12,0 +14,0 @@ Object.defineProperty(exports, "Point", { enumerable: true, get: function () { return point_1.Point; } }); |
@@ -165,2 +165,3 @@ "use strict"; | ||
const key = `padding${(0, helper_1.capitalizeFirst)((0, string_1.camelCase)(position))}`; | ||
const insetKey = `inset${(0, helper_1.capitalizeFirst)((0, string_1.camelCase)(position))}`; | ||
const components = positionComponents.get(position) || []; | ||
@@ -167,0 +168,0 @@ const value = layout[key]; |
import { IDocument } from '@antv/g'; | ||
import { G2ComponentOptions, G2Context, G2Library } from './types/options'; | ||
import { G2Component, G2ComponentNamespaces, G2ComponentValue } from './types/component'; | ||
export declare function useLibrary<O extends G2ComponentOptions, C extends G2Component, V extends G2ComponentValue>(namespace: G2ComponentNamespaces, library: G2Library): [(options: O, context?: any) => V, (type: O['type']) => C]; | ||
export declare function useLibrary<O extends G2ComponentOptions, C extends G2Component, V extends G2ComponentValue>(namespace: G2ComponentNamespaces, publicLibrary: G2Library): [(options: O, context?: any) => V, (type: O['type']) => C]; | ||
export declare function documentOf(library: G2Context): IDocument; |
@@ -16,3 +16,5 @@ "use strict"; | ||
const helper_1 = require("../utils/helper"); | ||
function useLibrary(namespace, library) { | ||
const builtinlib_1 = require("../lib/builtinlib"); | ||
function useLibrary(namespace, publicLibrary) { | ||
const library = Object.assign(Object.assign({}, (0, builtinlib_1.builtinlib)()), publicLibrary); | ||
const create = (type) => { | ||
@@ -19,0 +21,0 @@ if (typeof type !== 'string') |
@@ -70,3 +70,3 @@ "use strict"; | ||
// Initialize the context if it is not provided. | ||
const { width = 640, height = 480, depth = 0, theme } = options; | ||
const { width = 640, height = 480, depth = 0 } = options; | ||
const keyed = inferKeys(options); | ||
@@ -73,0 +73,0 @@ const { canvas = Canvas(width, height), emitter = new event_emitter_1.default(), library, } = context; |
@@ -13,2 +13,3 @@ export { Rect as IntervalShape } from './interval/rect'; | ||
export { Trail as LineTrail } from './line/trail'; | ||
export { Line as Line3DShape } from './line3D/line'; | ||
export { HollowBowtie as PointHollowBowtie } from './point/hollowBowtie'; | ||
@@ -15,0 +16,0 @@ export { HollowDiamond as PointHollowDiamond } from './point/hollowDiamond'; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.BoxViolin = exports.BoxShape = exports.PolygonRibbon = exports.PolygonShape = exports.ImageShape = exports.LinkArc = exports.LinkVHV = exports.LinkSmooth = exports.LinkShape = exports.AreaHV = exports.AreaVH = exports.AreaHVH = exports.AreaSmooth = exports.AreaShape = exports.TextBadge = exports.TextShape = exports.VectorShape = exports.Cube = exports.Sphere = exports.PointTriangleDown = exports.PointTriangle = exports.PointTick = exports.PointSquare = exports.PointShape = exports.PointPlus = exports.PointLine = exports.PointHyphen = exports.PointHexagon = exports.PointDiamond = exports.PointCross = exports.PointBowtie = exports.PointHollowTriangleDown = exports.PointHollowTriangle = exports.PointHollowSquare = exports.PointHollow = exports.PointHollowHexagon = exports.PointHollowDiamond = exports.PointHollowBowtie = exports.LineTrail = exports.LineHVH = exports.LineVH = exports.LineHV = exports.LineSmooth = exports.LineShape = exports.CellHollow = exports.CellShape = exports.IntervalPyramid = exports.IntervalFunnel = exports.IntervalHollow = exports.IntervalShape = void 0; | ||
exports.ShapeShape = exports.RectHollow = exports.RectShape = exports.RangeShape = exports.HeatmapShape = exports.DensityShape = exports.PathHollow = exports.PathShape = exports.LabelShape = exports.ConnectorShape = exports.LineXY = void 0; | ||
exports.BoxShape = exports.PolygonRibbon = exports.PolygonShape = exports.ImageShape = exports.LinkArc = exports.LinkVHV = exports.LinkSmooth = exports.LinkShape = exports.AreaHV = exports.AreaVH = exports.AreaHVH = exports.AreaSmooth = exports.AreaShape = exports.TextBadge = exports.TextShape = exports.VectorShape = exports.Cube = exports.Sphere = exports.PointTriangleDown = exports.PointTriangle = exports.PointTick = exports.PointSquare = exports.PointShape = exports.PointPlus = exports.PointLine = exports.PointHyphen = exports.PointHexagon = exports.PointDiamond = exports.PointCross = exports.PointBowtie = exports.PointHollowTriangleDown = exports.PointHollowTriangle = exports.PointHollowSquare = exports.PointHollow = exports.PointHollowHexagon = exports.PointHollowDiamond = exports.PointHollowBowtie = exports.Line3DShape = exports.LineTrail = exports.LineHVH = exports.LineVH = exports.LineHV = exports.LineSmooth = exports.LineShape = exports.CellHollow = exports.CellShape = exports.IntervalPyramid = exports.IntervalFunnel = exports.IntervalHollow = exports.IntervalShape = void 0; | ||
exports.ShapeShape = exports.RectHollow = exports.RectShape = exports.RangeShape = exports.HeatmapShape = exports.DensityShape = exports.PathHollow = exports.PathShape = exports.LabelShape = exports.ConnectorShape = exports.LineXY = exports.BoxViolin = void 0; | ||
var rect_1 = require("./interval/rect"); | ||
@@ -29,2 +29,4 @@ Object.defineProperty(exports, "IntervalShape", { enumerable: true, get: function () { return rect_1.Rect; } }); | ||
Object.defineProperty(exports, "LineTrail", { enumerable: true, get: function () { return trail_1.Trail; } }); | ||
var line_2 = require("./line3D/line"); | ||
Object.defineProperty(exports, "Line3DShape", { enumerable: true, get: function () { return line_2.Line; } }); | ||
var hollowBowtie_1 = require("./point/hollowBowtie"); | ||
@@ -54,4 +56,4 @@ Object.defineProperty(exports, "PointHollowBowtie", { enumerable: true, get: function () { return hollowBowtie_1.HollowBowtie; } }); | ||
Object.defineProperty(exports, "PointHyphen", { enumerable: true, get: function () { return hyphen_1.Hyphen; } }); | ||
var line_2 = require("./point/line"); | ||
Object.defineProperty(exports, "PointLine", { enumerable: true, get: function () { return line_2.Line; } }); | ||
var line_3 = require("./point/line"); | ||
Object.defineProperty(exports, "PointLine", { enumerable: true, get: function () { return line_3.Line; } }); | ||
var plus_1 = require("./point/plus"); | ||
@@ -107,4 +109,4 @@ Object.defineProperty(exports, "PointPlus", { enumerable: true, get: function () { return plus_1.Plus; } }); | ||
Object.defineProperty(exports, "BoxViolin", { enumerable: true, get: function () { return violin_1.Violin; } }); | ||
var line_3 = require("./lineXY/line"); | ||
Object.defineProperty(exports, "LineXY", { enumerable: true, get: function () { return line_3.Line; } }); | ||
var line_4 = require("./lineXY/line"); | ||
Object.defineProperty(exports, "LineXY", { enumerable: true, get: function () { return line_4.Line; } }); | ||
var connector_1 = require("./connector/connector"); | ||
@@ -111,0 +113,0 @@ Object.defineProperty(exports, "ConnectorShape", { enumerable: true, get: function () { return connector_1.Connector; } }); |
@@ -39,3 +39,3 @@ "use strict"; | ||
// @ts-ignore | ||
context.cubeMaterial = new g_plugin_3d_1.MeshPhongMaterial(device); | ||
context.cubeMaterial = new g_plugin_3d_1.MeshLambertMaterial(device); | ||
} | ||
@@ -42,0 +42,0 @@ return (points, value, defaults) => { |
@@ -39,3 +39,3 @@ "use strict"; | ||
// @ts-ignore | ||
context.sphereMaterial = new g_plugin_3d_1.MeshPhongMaterial(device); | ||
context.sphereMaterial = new g_plugin_3d_1.MeshLambertMaterial(device); | ||
} | ||
@@ -42,0 +42,0 @@ return (points, value, defaults) => { |
@@ -237,2 +237,4 @@ "use strict"; | ||
titleTransformOrigin: 'center', | ||
lineArrowOffset: 6, | ||
lineArrowSize: 6, | ||
}, | ||
@@ -239,0 +241,0 @@ axisTop: { |
@@ -8,3 +8,3 @@ "use strict"; | ||
STROKE: '#416180', | ||
DEFAULT: '#5B8FF9', | ||
DEFAULT: '#1783FF', | ||
BACKGROUND: 'transparent', | ||
@@ -11,0 +11,0 @@ }; |
{ | ||
"name": "@antv/g2", | ||
"version": "5.0.23", | ||
"version": "5.0.24", | ||
"description": "the Grammar of Graphics in Javascript", | ||
@@ -45,3 +45,3 @@ "license": "MIT", | ||
"sideEffects": [ | ||
"./src/index.ts" | ||
"./esm/index.js" | ||
], | ||
@@ -48,0 +48,0 @@ "keywords": [ |
@@ -19,5 +19,10 @@ import { G2Spec } from '../spec'; | ||
type BuiltinComposition = { | ||
'composition.mark': any; | ||
'composition.view': any; | ||
}; | ||
export type API<Spec, Library> = Runtime<Spec> & | ||
MarkOf<Library, (composite?) => MarkNode> & | ||
CompositionOf<Library>; | ||
CompositionOf<Library & BuiltinComposition>; | ||
@@ -24,0 +29,0 @@ export function extend< |
@@ -225,5 +225,8 @@ import { IRenderer, RendererPlugin, Canvas as GCanvas } from '@antv/g'; | ||
// Create composition generators. | ||
const compositions = Object.keys(library).filter( | ||
(key) => key.startsWith('composition.') && key !== 'composition.mark', | ||
); | ||
const compositions = [ | ||
'composition.view', // chat.view() | ||
...Object.keys(library).filter( | ||
(key) => key.startsWith('composition.') && key !== 'composition.mark', | ||
), | ||
]; | ||
this._compositions = Object.fromEntries( | ||
@@ -230,0 +233,0 @@ compositions.map((key) => { |
import { | ||
Cartesian, | ||
Polar, | ||
Helix, | ||
Transpose, | ||
@@ -56,12 +55,6 @@ Theta, | ||
import { | ||
AxisLinear, | ||
AxisArc, | ||
AxisX, | ||
AxisY, | ||
AxisRadar, | ||
LegendCategory, | ||
LegendContinuous, | ||
LegendContinuousBlock, | ||
LegendContinuousBlockSize, | ||
LegendContinuousSize, | ||
TitleComponent, | ||
@@ -110,3 +103,2 @@ SliderX, | ||
Poptip, | ||
Event, | ||
ScrollbarFilter, | ||
@@ -117,4 +109,2 @@ } from '../interaction'; | ||
SpaceFlex, | ||
Mark, | ||
View, | ||
FacetRect, | ||
@@ -173,3 +163,2 @@ FacetCircle, | ||
} from '../label-transform'; | ||
import { LabelShape } from '../shape'; | ||
@@ -218,3 +207,2 @@ export function corelib() { | ||
'coordinate.polar': Polar, | ||
'coordinate.helix': Helix, | ||
'coordinate.transpose': Transpose, | ||
@@ -252,3 +240,2 @@ 'coordinate.theta': Theta, | ||
'mark.heatmap': Heatmap, | ||
'shape.label.label': LabelShape, | ||
'palette.category10': Category10, | ||
@@ -276,10 +263,4 @@ 'palette.category20': Category20, | ||
'component.axisY': AxisY, | ||
'component.axisRadar': AxisRadar, | ||
'component.axisLinear': AxisLinear, | ||
'component.axisArc': AxisArc, | ||
'component.legendCategory': LegendCategory, | ||
'component.legendContinuous': LegendContinuous, | ||
'component.legendContinuousBlock': LegendContinuousBlock, | ||
'component.legendContinuousBlockSize': LegendContinuousBlockSize, | ||
'component.legendContinuousSize': LegendContinuousSize, | ||
'component.legends': Legends, | ||
@@ -325,7 +306,4 @@ 'component.title': TitleComponent, | ||
'interaction.poptip': Poptip, | ||
'interaction.event': Event, | ||
'composition.spaceLayer': SpaceLayer, | ||
'composition.spaceFlex': SpaceFlex, | ||
'composition.mark': Mark, | ||
'composition.view': View, | ||
'composition.facetRect': FacetRect, | ||
@@ -332,0 +310,0 @@ 'composition.repeatMatrix': RepeatMatrix, |
@@ -1,8 +0,14 @@ | ||
import { ForceGraph, Tree } from '../mark'; | ||
import { Sankey, Treemap, Pack, ForceGraph, Tree } from '../mark'; | ||
import { Arc, Cluster } from '../data'; | ||
export function graphlib() { | ||
return { | ||
'data.arc': Arc, | ||
'data.cluster': Cluster, | ||
'mark.forceGraph': ForceGraph, | ||
'mark.tree': Tree, | ||
'mark.pack': Pack, | ||
'mark.sankey': Sankey, | ||
'mark.treemap': Treemap, | ||
} as const; | ||
} |
@@ -1,3 +0,3 @@ | ||
import { Sankey, Treemap, Pack, Boxplot, WordCloud, Gauge } from '../mark'; | ||
import { Arc, Cluster, Venn } from '../data'; | ||
import { Boxplot, WordCloud, Gauge } from '../mark'; | ||
import { Venn } from '../data'; | ||
@@ -7,8 +7,3 @@ export function plotlib() { | ||
'data.venn': Venn, | ||
'data.arc': Arc, | ||
'data.cluster': Cluster, | ||
'mark.sankey': Sankey, | ||
'mark.treemap': Treemap, | ||
'mark.boxplot': Boxplot, | ||
'mark.pack': Pack, | ||
'mark.gauge': Gauge, | ||
@@ -15,0 +10,0 @@ 'mark.wordCloud': WordCloud, |
import { Cartesian3D } from '../coordinate'; | ||
import { AxisZ } from '../component'; | ||
import { Point3D } from '../mark'; | ||
import { Point3D, Line3D } from '../mark'; | ||
@@ -10,3 +10,4 @@ export function threedlib() { | ||
'mark.point3D': Point3D, | ||
'mark.line3D': Line3D, | ||
} as const; | ||
} |
export { Interval } from './interval'; | ||
export { Rect } from './rect'; | ||
export { Line } from './line'; | ||
export { Line3D } from './line3D'; | ||
export { Point } from './point'; | ||
@@ -5,0 +6,0 @@ export { Point3D } from './point3D'; |
@@ -314,2 +314,3 @@ import { Coordinate } from '@antv/coord'; | ||
const key = `padding${capitalizeFirst(camelCase(position))}`; | ||
const insetKey = `inset${capitalizeFirst(camelCase(position))}`; | ||
const components = positionComponents.get(position) || []; | ||
@@ -316,0 +317,0 @@ const value = layout[key]; |
import { IDocument } from '@antv/g'; | ||
import { error } from '../utils/helper'; | ||
import { builtinlib } from '../lib/builtinlib'; | ||
import { G2ComponentOptions, G2Context, G2Library } from './types/options'; | ||
@@ -16,4 +17,6 @@ import { | ||
namespace: G2ComponentNamespaces, | ||
library: G2Library, | ||
publicLibrary: G2Library, | ||
): [(options: O, context?) => V, (type: O['type']) => C] { | ||
const library = { ...builtinlib(), ...publicLibrary }; | ||
const create = (type: O['type']) => { | ||
@@ -20,0 +23,0 @@ if (typeof type !== 'string') return type; |
@@ -73,3 +73,3 @@ import { Canvas as GCanvas, DisplayObject, Group } from '@antv/g'; | ||
// Initialize the context if it is not provided. | ||
const { width = 640, height = 480, depth = 0, theme } = options; | ||
const { width = 640, height = 480, depth = 0 } = options; | ||
const keyed = inferKeys(options); | ||
@@ -76,0 +76,0 @@ const { |
@@ -13,2 +13,3 @@ export { Rect as IntervalShape } from './interval/rect'; | ||
export { Trail as LineTrail } from './line/trail'; | ||
export { Line as Line3DShape } from './line3D/line'; | ||
export { HollowBowtie as PointHollowBowtie } from './point/hollowBowtie'; | ||
@@ -15,0 +16,0 @@ export { HollowDiamond as PointHollowDiamond } from './point/hollowDiamond'; |
@@ -1,2 +0,2 @@ | ||
import { MeshPhongMaterial, CubeGeometry, Mesh } from '@antv/g-plugin-3d'; | ||
import { MeshLambertMaterial, CubeGeometry, Mesh } from '@antv/g-plugin-3d'; | ||
import { applyStyle, getOrigin, toOpacityKey } from '../utils'; | ||
@@ -31,3 +31,3 @@ import { ShapeComponent as SC } from '../../runtime'; | ||
// @ts-ignore | ||
context.cubeMaterial = new MeshPhongMaterial(device); | ||
context.cubeMaterial = new MeshLambertMaterial(device); | ||
} | ||
@@ -34,0 +34,0 @@ |
@@ -1,2 +0,2 @@ | ||
import { MeshPhongMaterial, SphereGeometry, Mesh } from '@antv/g-plugin-3d'; | ||
import { MeshLambertMaterial, SphereGeometry, Mesh } from '@antv/g-plugin-3d'; | ||
import { applyStyle, getOrigin, toOpacityKey } from '../utils'; | ||
@@ -31,3 +31,3 @@ import { ShapeComponent as SC } from '../../runtime'; | ||
// @ts-ignore | ||
context.sphereMaterial = new MeshPhongMaterial(device); | ||
context.sphereMaterial = new MeshLambertMaterial(device); | ||
} | ||
@@ -34,0 +34,0 @@ |
@@ -241,2 +241,4 @@ import { ThemeComponent as TC, Theme } from '../runtime'; | ||
titleTransformOrigin: 'center', | ||
lineArrowOffset: 6, | ||
lineArrowSize: 6, | ||
}, | ||
@@ -243,0 +245,0 @@ axisTop: { |
@@ -9,3 +9,3 @@ import { ThemeComponent as TC, Theme } from '../runtime'; | ||
STROKE: '#416180', | ||
DEFAULT: '#5B8FF9', | ||
DEFAULT: '#1783FF', | ||
BACKGROUND: 'transparent', | ||
@@ -12,0 +12,0 @@ }; |
Sorry, the diff of this file is too big to display
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 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
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
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
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
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
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
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
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
7850655
2807
105079