Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
@antv/g2-brush
Advanced tools
Readme
$ npm install @antv/g2-brush
or use cdn:
<script src="https://gw.alipayobjects.com/os/antv/assets/g2-brush/0.0.1/g2-brush.js"></script>
First of all, the brush instance must be created after the chart be rendered.
import Brush from '@antv/g2-brush';
// ...
chart.render();
new Brush({
canvas: chart.get('canvas'), // must be set
chart, // if you want to filter data by default, please set the chart
type: 'X', // set the brush type, default value is 'XY'
});
online demos: https://antvis.github.io/g2-brush/demos/#
$.getJSON('./data/top2000.json', data => {
const ds = new DataSet();
const dv = ds.createView('test')
.source(data)
.transform({
as: [ 'count' ],
groupBy: [ 'release' ],
operations: [ 'count' ],
type: 'aggregate'
});
const chart = new G2.Chart({
container: 'canvas',
forceFit: true,
height: window.innerHeight
});
chart.source(dv);
chart.scale({
count: {
alias: 'top2000 唱片总量'
},
release: {
tickInterval: 5,
alias: '唱片发行年份'
}
});
chart.interval()
.position('release*count')
.color('#e50000');
chart.render();
new Brush({
canvas: chart.get('canvas'),
chart,
type: 'X',
onBrushstart() {
chart.hideTooltip();
},
onBrushmove() {
chart.hideTooltip();
}
});
chart.on('plotdblclick', () => {
chart.get('options').filters = {};
chart.repaint();
});
});
$ npm install
$ npm run dev
Please let us know how can we help. Do check out issues for bug reports or suggestions first.
To become a contributor, please follow our contributing guide.
FAQs
Select a one-, two-dimensional or irregular region using the mouse.
The npm package @antv/g2-brush receives a total of 3,889 weekly downloads. As such, @antv/g2-brush popularity was classified as popular.
We found that @antv/g2-brush demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.