![Maven Central Adds Sigstore Signature Validation](https://cdn.sanity.io/images/cgdhsj6q/production/7da3bc8a946cfb5df15d7fcf49767faedc72b483-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
@visactor/vgrammar
Advanced tools
@visactor/vgrammar is the core package of VGrammar, which is a visual grammar library based on visual rendering engine VRender.
// npm
npm install @visactor/vgrammar
// yarn
yarn add @visactor/vgrammar
import { View } from '@visactor/vgrammar';
const spec = {
padding: { top: 5, right: 5, bottom: 30, left: 60 },
data: [
{
id: 'table',
values: [
{
name: 'A',
value: 214480
},
{
name: 'B',
value: 155506
},
{
name: 'C',
value: 100764
},
{
name: 'D',
value: 92715
}
]
}
],
scales: [
{
id: 'xscale',
type: 'band',
domain: { data: 'table', field: 'name' },
dependency: ['viewBox'],
range: (scale, params) => {
return [params.viewBox.x1, params.viewBox.x2];
},
padding: 0.05,
round: true
},
{
id: 'yscale',
type: 'linear',
domain: { data: 'table', field: 'value' },
dependency: ['viewBox'],
range: (scale, params) => {
return [params.viewBox.y2, params.viewBox.y1];
},
nice: true
}
],
marks: [
{
type: 'component',
componentType: 'axis',
scale: 'xscale',
tickCount: -1,
dependency: ['viewBox'],
encode: {
update: (scale, elment, params) => {
return {
x: params.viewBox.x1,
y: params.viewBox.y2,
start: { x: 0, y: 0 },
end: { x: params.viewBox.width(), y: 0 }
};
}
}
},
{
type: 'component',
componentType: 'axis',
scale: 'yscale',
dependency: ['viewBox'],
encode: {
update: (scale, elment, params) => {
return {
x: params.viewBox.x1,
y: params.viewBox.y1,
start: { x: 0, y: params.viewBox.height() },
end: { x: 0, y: 0 },
verticalFactor: -1
};
}
}
},
{
type: 'component',
componentType: 'crosshair',
scale: 'xscale',
crosshairShape: 'rect',
crosshairType: 'x',
dependency: ['viewBox'],
encode: {
update: (scale, elment, params) => {
return {
start: { y: params.viewBox.y1 },
rectStyle: { height: params.viewBox.height() }
};
}
}
},
{
type: 'rect',
from: { data: 'table' },
encode: {
update: {
x: { scale: 'xscale', field: 'name' },
width: { scale: 'xscale', band: 1 },
y: { scale: 'yscale', field: 'value' },
y1: {
callback: (datum, element, params) => {
return params.yscale.scale(params.yscale.domain()[0]);
},
dependency: ['yscale']
},
fill: '#6690F2'
},
hover: {
fill: 'red'
}
}
}
]
};
const vGrammarView = new View({
autoFit: true,
width: spec.width,
height: spec.height,
container: 'chart',
hover: true
});
vGrammarView.parseSpec(spec);
vGrammarView.runAsync();
FAQs
simple package of vgrammar.
The npm package @visactor/vgrammar receives a total of 17 weekly downloads. As such, @visactor/vgrammar popularity was classified as not popular.
We found that @visactor/vgrammar demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.