-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3510 from VisActor/release/1.13.0
[Auto release] release 1.13.0
- Loading branch information
Showing
171 changed files
with
8,531 additions
and
3,889 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
[{"definitionName":"lockStepVersion","policyName":"vchartMain","version":"1.12.15","mainProject":"@visactor/vchart","nextBump":"patch"}] | ||
[{"definitionName":"lockStepVersion","policyName":"vchartMain","version":"1.13.0","mainProject":"@visactor/vchart","nextBump":"minor"}] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
125 changes: 125 additions & 0 deletions
125
docs/assets/examples/en/pictogram-chart/pictogram-cow.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
--- | ||
category: examples | ||
group: pictogram chart | ||
title: SVG Beef Cuts | ||
keywords: pictogramChart, space | ||
order: 26-1 | ||
cover: /vchart/preview/pictogram-cow_1.13.0.png | ||
option: pictogramChart | ||
--- | ||
|
||
# SVG Beef Cuts | ||
|
||
> Demo is a replica of the echarts-Beef Cuts example. | ||
## Key Configurations | ||
|
||
- In the SVG file, configure the name attribute for the pictogram, then you can specify the pictogram style through the name configuration in the chart settings; | ||
|
||
## Code Demo | ||
|
||
```javascript livedemo | ||
/** --Add the following code when using in business context-- */ | ||
// When using in business context, please additionally import | ||
// import { registerPictogramChart } from '@visactor/vchart'; | ||
// registerPictogramChart(); | ||
/** --Add the above code when using in business context-- */ | ||
VCHART_MODULE.registerPictogramChart(); | ||
/** --Delete the above code when using in business context-- */ | ||
|
||
const response = await fetch('https://lf9-dp-fe-cms-tos.byteorg.com/obj/bit-cloud/pictogram/cow.svg'); | ||
const cow = await response.text(); | ||
|
||
const spec = { | ||
type: 'pictogram', | ||
data: { | ||
id: 'data', | ||
values: [ | ||
{ name: 'Queue', value: 15 }, | ||
{ name: 'Langue', value: 35 }, | ||
{ name: 'Plat de joue', value: 15 }, | ||
{ name: 'Gros bout de poitrine', value: 25 }, | ||
{ name: 'Jumeau à pot-au-feu', value: 45 }, | ||
{ name: 'Onglet', value: 85 }, | ||
{ name: 'Plat de tranche', value: 25 }, | ||
{ name: 'Araignée', value: 15 }, | ||
{ name: 'Gîte à la noix', value: 55 }, | ||
{ name: "Bavette d'aloyau", value: 25 }, | ||
{ name: 'Tende de tranche', value: 65 }, | ||
{ name: 'Rond de gîte', value: 45 }, | ||
{ name: 'Bavettede de flanchet', value: 85 }, | ||
{ name: 'Flanchet', value: 35 }, | ||
{ name: 'Hampe', value: 75 }, | ||
{ name: 'Plat de côtes', value: 65 }, | ||
{ name: 'Tendron Milieu de poitrine', value: 65 }, | ||
{ name: 'Macreuse à pot-au-feu', value: 85 }, | ||
{ name: 'Rumsteck', value: 75 }, | ||
{ name: 'Faux-filet', value: 65 }, | ||
{ name: 'Côtes Entrecôtes', value: 55 }, | ||
{ name: 'Basses côtes', value: 45 }, | ||
{ name: 'Collier', value: 85 }, | ||
{ name: 'Jumeau à biftek', value: 15 }, | ||
{ name: 'Paleron', value: 65 }, | ||
{ name: 'Macreuse à bifteck', value: 45 }, | ||
{ name: 'Gîte', value: 85 }, | ||
{ name: 'Aiguillette baronne', value: 65 }, | ||
{ name: 'Filet', value: 95 } | ||
] | ||
}, | ||
nameField: 'name', | ||
valueField: 'value', | ||
color: { | ||
type: 'linear', | ||
domain: [ | ||
{ | ||
dataId: 'data', | ||
fields: ['value'] | ||
} | ||
], | ||
range: ['#f51633', '#921319'] | ||
}, | ||
legends: [ | ||
{ | ||
visible: true, | ||
type: 'color', | ||
field: 'value', | ||
orient: 'top' | ||
} | ||
], | ||
region: [ | ||
{ | ||
roam: true | ||
} | ||
], | ||
svg: 'cow', | ||
pictogram: { | ||
style: { | ||
fill: { | ||
field: 'value', | ||
scale: 'color' | ||
} | ||
} | ||
}, | ||
'Tendron Milieu de poitrine': { | ||
style: { | ||
fill: 'orange' | ||
}, | ||
state: { | ||
hover: { | ||
fill: '#FFBF7F' | ||
} | ||
} | ||
} | ||
}; | ||
VChart.registerSVG('cow', cow); | ||
|
||
const vchart = new VChart(spec, { dom: CONTAINER_ID }); | ||
vchart.renderSync(); | ||
|
||
// Just for the convenience of console debugging, DO NOT COPY! | ||
window['vchart'] = vchart; | ||
``` | ||
|
||
## Related Tutorials | ||
|
||
[PictogramChart](link) |
Oops, something went wrong.