@antv/gpt-vis 1.3.0 → 1.3.1
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 +25 -2
- package/dist/cjs/theme/g6.d.ts +1 -1
- package/dist/cjs/theme/presets.d.ts +5 -0
- package/dist/cjs/theme/presets.js +663 -0
- package/dist/cjs/theme/resolve.js +2 -1
- package/dist/cjs/theme/table.js +1 -1
- package/dist/cjs/types/index.d.ts +3 -3
- package/dist/cjs/types/theme.d.ts +2 -0
- package/dist/cjs/vis/table/index.js +2 -0
- package/dist/esm/theme/g6.d.ts +1 -1
- package/dist/esm/theme/presets.d.ts +5 -0
- package/dist/esm/theme/presets.js +1070 -0
- package/dist/esm/theme/resolve.js +5 -1
- package/dist/esm/theme/table.js +1 -1
- package/dist/esm/types/index.d.ts +3 -3
- package/dist/esm/types/theme.d.ts +2 -0
- package/dist/esm/vis/table/index.js +1 -1
- package/dist/umd/index.min.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -123,7 +123,7 @@ gptVis.render({
|
|
|
123
123
|
|
|
124
124
|
**Themes:**
|
|
125
125
|
|
|
126
|
-
|
|
126
|
+
Built-in themes are switchable via the `theme` property. The original base themes keep their existing appearance:
|
|
127
127
|
|
|
128
128
|
| Theme | Identifier | Background | Palette |
|
|
129
129
|
| --------------- | ---------- | ---------- | ----------------------------------------------------- |
|
|
@@ -131,6 +131,29 @@ Three built-in themes, switchable via the `theme` property:
|
|
|
131
131
|
| Dark | `dark` | `#141414` | `#5B6CFF` `#2DAF9E` `#F2B84B` `#EF6A6A` `#55A6D9` ... |
|
|
132
132
|
| Academy | `academy` | `#FFF` | `#4e79a7` `#f28e2c` `#e15759` `#76b7b2` `#59a14f` ... |
|
|
133
133
|
|
|
134
|
+
The website's 10 gallery styles are also built in:
|
|
135
|
+
|
|
136
|
+
| Theme | Identifier |
|
|
137
|
+
| ----------------------------------------------- | -------------- |
|
|
138
|
+
| GPT-Vis | `gpt-vis` |
|
|
139
|
+
| Midnight | `midnight` |
|
|
140
|
+
| Paper | `paper` |
|
|
141
|
+
| Product | `product` |
|
|
142
|
+
| Neon Circuit | `neon-circuit` |
|
|
143
|
+
| Terra Print | `terra-print` |
|
|
144
|
+
| Mono Signal | `mono-signal` |
|
|
145
|
+
| Candy Pop | `candy-pop` |
|
|
146
|
+
| [Pop](https://github.com/microsoft/flint-chart) | `pop` |
|
|
147
|
+
| Bauhaus | `bauhaus` |
|
|
148
|
+
|
|
149
|
+
The branded `gpt-vis` preset is separate from the SDK's `default`.
|
|
150
|
+
|
|
151
|
+
```typescript
|
|
152
|
+
const chart = new GPTVis({ container: '#chart', theme: 'pop' });
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
Names work in the constructor, chart JSON, and Syntax (`theme pop`). Summary receives its theme through the constructor. The supported name type is `BuiltinThemeName`.
|
|
156
|
+
|
|
134
157
|
```javascript
|
|
135
158
|
gptVis.render({
|
|
136
159
|
type: 'line',
|
|
@@ -161,7 +184,7 @@ Precedence: **single-chart config > custom ThemeSpec > GPT-Vis built-in theme**.
|
|
|
161
184
|
|
|
162
185
|
Explore [Theme Studio](https://gpt-vis.antv.vision/themes), read the [theme documentation](https://gpt-vis.antv.vision/docs#custom-themes), or use the [theme creation guide](./skills/chart-visualization/references/theme-creator.md) to generate a ThemeSpec from your brand references.
|
|
163
186
|
|
|
164
|
-
Studio presets
|
|
187
|
+
Unchanged Studio presets can be used by their built-in names. After customization, pass the full object as `theme`; a custom `id` is metadata and does not register a new name.
|
|
165
188
|
|
|
166
189
|
**Custom Styles:**
|
|
167
190
|
|
package/dist/cjs/theme/g6.d.ts
CHANGED