-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
….g. right to left). Base now has title and description svg tags for accessibility
- Loading branch information
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
import '@testing-library/jest-dom/extend-expect'; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import { FC } from 'react'; | ||
import { TLabelComponent } from './components/Label'; | ||
export declare type TUpsetData = { | ||
keys: string[]; | ||
value: number; | ||
}[]; | ||
interface IProps { | ||
colorScheme?: string[]; | ||
data: TUpsetData; | ||
height: number; | ||
hoverColorScheme?: string[]; | ||
showLabels?: boolean[]; | ||
visible?: Record<string, boolean>; | ||
width: number; | ||
xAxisHeight?: number; | ||
yAxisWidth?: number; | ||
textFill?: string; | ||
distribution?: { | ||
colorScheme: string[]; | ||
fill: { | ||
active: string; | ||
inactive: string; | ||
}; | ||
label?: string; | ||
}; | ||
setSize?: { | ||
dimensions: { | ||
chartWidth: number; | ||
axisWidth: number; | ||
height: number; | ||
}; | ||
label?: string; | ||
colorScheme: string[]; | ||
LabelComponent?: TLabelComponent; | ||
}; | ||
axisSpace?: number; | ||
radius?: number; | ||
/** @description accessible title */ | ||
title: string; | ||
/** @description accessible description */ | ||
description: string; | ||
} | ||
declare const UpsetChart: FC<IProps>; | ||
export default UpsetChart; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"componentChunkName":"component---src-pages-chord-tsx","path":"/chord/","result":{"pageContext":{}},"staticQueryHashes":["3649515864","63159454"]} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"componentChunkName":"component---cache-dev-404-page-js","path":"/dev-404-page/","result":{"data":{"allSitePage":{"nodes":[{"path":"/404/"},{"path":"/brush/"},{"path":"/chord/"},{"path":"/histogram/"},{"path":"/"},{"path":"/joyplot/"},{"path":"/line/"},{"path":"/map/"},{"path":"/pie/"},{"path":"/tornado/"},{"path":"/upset/"},{"path":"/404.html"}]}},"pageContext":{}},"staticQueryHashes":[]} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"componentChunkName":"component---src-pages-upset-tsx","path":"/upset/","result":{"pageContext":{}},"staticQueryHashes":["3649515864","63159454"]} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
// Be sure to include styles at some point, probably during your bootstrapping | ||
import 'react-datasheet/lib/react-datasheet.css'; | ||
|
||
import React, { FC } from 'react'; | ||
|
||
import { | ||
Card, | ||
CardContent, | ||
Grid, | ||
Typography, | ||
} from '@material-ui/core'; | ||
|
||
import UpsetChart, { TUpsetData } from '../../../src/UpsetChart'; | ||
import Layout from '../components/layout'; | ||
import SEO from '../components/seo'; | ||
|
||
const data: TUpsetData = [ | ||
{ keys: ['Another label'], value: 10 }, | ||
{ keys: ['Another label', 'B'], value: 14 }, | ||
{ keys: ['Another label', 'B', 'C'], value: 1 }, | ||
{ keys: ['B'], value: 10 }, | ||
{ keys: ['Another label', 'C'], value: 14 }, | ||
{ keys: ['C'], value: 12 }, | ||
]; | ||
|
||
const UpsetExample: FC = () => { | ||
return ( | ||
<Layout> | ||
<SEO title="Line Chart" description="" /> | ||
<Typography variant="h2">Upset</Typography> | ||
<div> | ||
<Grid container spacing={10}> | ||
<Grid item xs={6}> | ||
<Card> | ||
<CardContent> | ||
<UpsetChart | ||
title="example upset chart" | ||
description="more info for accessibility" | ||
width={600} | ||
height={400} | ||
distribution={{ | ||
colorScheme: ['rgb(154, 187, 218)'], | ||
fill: { | ||
active: 'rgb(154, 187, 218)', | ||
inactive: '#ddd', | ||
}, | ||
}} | ||
setSize={{ | ||
dimensions: { chartWidth: 100, axisWidth: 120, height: 150 }, | ||
colorScheme: ['rgb(154, 218, 172)'], | ||
}} | ||
data={data} /> | ||
</CardContent> | ||
</Card> | ||
</Grid> | ||
</Grid> | ||
</div> | ||
</Layout> | ||
); | ||
}; | ||
|
||
export default UpsetExample; |
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
This file was deleted.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
This file was deleted.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.