forked from deephaven/web-client-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCharts.tsx
More file actions
24 lines (19 loc) · 702 Bytes
/
Charts.tsx
File metadata and controls
24 lines (19 loc) · 702 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import React, { type ReactElement, useState } from 'react';
import { Chart, type ChartModel, MockChartModel } from '@deephaven/chart';
import { useApi } from '@deephaven/jsapi-bootstrap';
import { useSeededRandomNumberCallback } from './utils';
import SampleSection from './SampleSection';
function Charts(): ReactElement {
const dh = useApi();
MockChartModel.random = useSeededRandomNumberCallback();
const [model] = useState(() => new MockChartModel(dh));
return (
<SampleSection name="charts">
<h2 className="ui-title">Chart</h2>
<div style={{ height: 500 }}>
<Chart model={model as ChartModel} />
</div>
</SampleSection>
);
}
export default Charts;