@graphysdk/react 1.9.0-beta.1789576170858 → 1.9.0-beta.1789582064893
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -5
- package/dist/authoring.d.ts +1 -1
- package/dist/brand-mark-default.d.ts +2 -2
- package/dist/editable.browser.mjs +4707 -4706
- package/dist/editable.d.ts +1 -1
- package/dist/graph-provider.d.ts +1 -1
- package/dist/index.browser.mjs +2881 -2880
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +10 -10
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -17,11 +17,11 @@ Requires React 19. There is no stylesheet to import.
|
|
|
17
17
|
```tsx
|
|
18
18
|
import { GraphProvider, GraphRenderer, createSpec, pipe, geom, scale } from '@graphysdk/react';
|
|
19
19
|
|
|
20
|
-
const
|
|
20
|
+
const spec = pipe(createSpec({ x: 'month', y: 'revenue' }), geom.bar(), scale.x(), scale.y());
|
|
21
21
|
|
|
22
22
|
export function Chart({ data }) {
|
|
23
23
|
return (
|
|
24
|
-
<GraphProvider data={data}
|
|
24
|
+
<GraphProvider data={data} spec={spec}>
|
|
25
25
|
<GraphRenderer />
|
|
26
26
|
</GraphProvider>
|
|
27
27
|
);
|
|
@@ -39,9 +39,9 @@ export function Chart({ data }) {
|
|
|
39
39
|
import { GraphProvider } from '@graphysdk/react';
|
|
40
40
|
import { EditableGraphRenderer } from '@graphysdk/react/editable';
|
|
41
41
|
|
|
42
|
-
export function EditableChart({ data,
|
|
42
|
+
export function EditableChart({ data, spec, isEditing }) {
|
|
43
43
|
return (
|
|
44
|
-
<GraphProvider data={data}
|
|
44
|
+
<GraphProvider data={data} spec={spec}>
|
|
45
45
|
<EditableGraphRenderer mode={isEditing ? 'editable' : 'readonly'} />
|
|
46
46
|
</GraphProvider>
|
|
47
47
|
);
|
|
@@ -53,7 +53,7 @@ export function EditableChart({ data, input, isEditing }) {
|
|
|
53
53
|
```tsx
|
|
54
54
|
import { config, createSpec, geom, pipe } from '@graphysdk/react';
|
|
55
55
|
|
|
56
|
-
const
|
|
56
|
+
const spec = pipe(
|
|
57
57
|
createSpec({ x: 'month', y: 'revenue' }),
|
|
58
58
|
geom.bar(),
|
|
59
59
|
config({ content: { isBrandMarkVisible: false } })
|
package/dist/authoring.d.ts
CHANGED
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* The render half (`defineGeomRenderer`, `createGraphyKit`, `UnitSpaceSvg`) is re-exported from
|
|
4
4
|
* `@graphysdk/react-renderer` by the package index, so a custom geom can be authored from one import.
|
|
5
5
|
*/
|
|
6
|
-
export type { AnchorContext, AnchorPosition, ColorScheme, CompiledGeom, Data, GeomCompilerInput, GeomStyleReaders, HoverHit, Observation, Scene, SceneLayer, Spec,
|
|
6
|
+
export type { AnchorContext, AnchorPosition, ColorScheme, CompiledGeom, Data, GeomCompilerInput, GeomStyleReaders, HoverHit, Observation, ResolvedSpec, Scene, SceneLayer, Spec, } from '@graphysdk/viz-engine';
|
|
7
7
|
export { annotation, config, coord, createSpec, createStyleResolver, Dataset, Geom, geom, getAlpha, getAngleExtent, getBarRectBounds, getColor, getGroup, getLineType, getRadiusExtent, getScaledAesthetic, getSize, getStrokeWidth, getTileRectBounds, getX, getXMax, getXMin, getY, getYMax, getYMin, getYRaw, GROUP_VARIABLES, highlight, mapping, pipe, POSITION_VARIABLES, scale, stat, style, styles, token, toPercent, toViewBoxX, toViewBoxY, transform, VISUAL_VARIABLES, } from '@graphysdk/viz-engine';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Spec } from '@graphysdk/viz-engine';
|
|
2
2
|
/**
|
|
3
3
|
* Seed the "Made with Graphy" provenance badge to on for the batteries-included entry point.
|
|
4
4
|
*
|
|
@@ -14,4 +14,4 @@ import { SpecInput } from '@graphysdk/viz-engine';
|
|
|
14
14
|
* with the caller-side `useMemo` in {@link GraphProvider}, a stable input yields a stable result, so nothing
|
|
15
15
|
* downstream recompiles just because the mark was defaulted.
|
|
16
16
|
*/
|
|
17
|
-
export declare function withBrandMarkDefault(
|
|
17
|
+
export declare function withBrandMarkDefault(spec: Spec): Spec;
|