Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
react-virtualized-pivot
Advanced tools
react-virtualized-pivot is a React.js pivot UI built on top of react-virtualized and quick-pivot.
https://turnerniles.github.io/react-virtualized-pivot/
The demo uses ~24.7mb uncompressed .csv, 269,372 rows by 9 columns (2,424,348 cells) of 2007-2012 Declined Loan data provided by Lending Club.
Install react-virtualized-pivot
using npm.
npm install react-virtualized-pivot --save
import Pivot from 'react-virtualized-pivot';
// Be sure to include styles at some point, probably during your bootstrapping
import 'react-virtualized-pivot/dist/commonjs/styles.css';
<Pivot
data={[
['name', 'gender', 'house', 'age'],
['Jon', 'm', 'Stark', 14],
['Arya', 'f', 'Stark', 10],
['Cersei', 'f', 'Baratheon', 38],
['Tywin', 'm', 'Lannister', 67],
['Tyrion', 'm', 'Lannister', 34],
['Joffrey', 'm', 'Baratheon', 18],
['Bran', 'm', 'Stark', 8],
['Jaime', 'm', 'Lannister', 32],
['Sansa', 'f', 'Stark', 12],
]}
/>
You can also use a global-friendly UMD build:
<link rel="stylesheet" href="path-to-react-virtualized-pivot/dist/umd/styles.css">
<script src="path-to-react-virtualized-pivot/dist/umd/react-virtualized-pivot.js"></script>
<Pivot>
accepts the following props:
data
(required)
bodyCellValueTransformation
colTotals
colorPack
onGridCellClick
onGridHeaderCellClick
onLeftGridCellClick
onLeftHeaderCellClick
rowTotals
selectedAggregationDimension
import React from 'react';
import Pivot from 'react-virtualized-pivot';
import 'react-virtualized-pivot/dist/es/styles.css';
const data = [
['name', 'gender', 'house', 'age'],
['Jon', 'm', 'Stark', 14],
['Arya', 'f', 'Stark', 10],
['Cersei', 'f', 'Baratheon', 38],
['Tywin', 'm', 'Lannister', 67],
['Tyrion', 'm', 'Lannister', 34],
['Joffrey', 'm', 'Baratheon', 18],
['Bran', 'm', 'Stark', 8],
['Jaime', 'm', 'Lannister', 32],
['Sansa', 'f', 'Stark', 12],
];
const colorPack = {
columnResizer: '#e0e0e0',
sortableFieldBackground: '#fafafa',
sortableFieldText: '#000',
sortableContainerBackground: '#fff',
sortableContainerBorderColor: '#ccc',
selectorContainerTitleBackground: '#fafafa',
selectorContainerTitleText: '#000',
leftHeaderCellBackground: '#fafafa',
leftHeaderCellText: '#000',
headerGridBackground: '#fafafa',
headerGridText: '#000',
leftSideGridBackground: '#fff',
leftSideGridText: '#000',
bodyGridBackground: '#fff',
bodyGridText: '#000',
evenRowBackground: '#fff',
oddRowBackground: '#fafafa',
gridBorders: '#e0e0e0',
icons: '#ccc',
};
function bodyCellValueTransformation({value}) {
if (value > 10) return 'i am greater than 10';
return value;
}
function onGridCellClick({rowIndex, columnIndex, children, childrenData, rowHeaders, columnHeaders}) {
console.log('clicked on body cell');
console.log('rowIndex', rowIndex);
console.log('columnIndex', columnIndex);
console.log('children', children);
console.log('childrenData', childrenData);
console.log('rowHeaders', rowHeaders);
console.log('columnHeaders', columnHeaders);
}
function onLeftGridCellClick({rowIndex, columnIndex, children, childrenData, rowHeaders, columnHeaders}) {
console.log('clicked on a left row header');
console.log('rowIndex', rowIndex);
console.log('columnIndex', columnIndex);
console.log('children', children);
console.log('childrenData', childrenData);
console.log('rowHeaders', rowHeaders);
console.log('columnHeaders', columnHeaders);
}
function onGridHeaderCellClick({rowIndex, columnIndex}) {
console.log('clicked on column header');
console.log('rowIndex', rowIndex);
console.log('columnIndex', columnIndex);
}
function onLeftHeaderCellClick() {
console.log('clicked on the top left corner cell');
}
<Pivot
data={data}
colorPack={colorPack}
onGridCellClick={onGridCellClick}
onLeftGridCellClick={onLeftGridCellClick}
onGridHeaderCellClick={onGridHeaderCellClick}
onLeftHeaderCellClick={onLeftHeaderCellClick}
rowTotals={true}
selectedAggregationDimension={'age'}
/>
Please contribute to the project, including this README.
FAQs
React Virtualized Pivot
We found that react-virtualized-pivot demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.