Skip to content
Snippets Groups Projects
Unverified Commit 1f5860b1 authored by Kyle Doherty's avatar Kyle Doherty
Browse files

use actual visualization for histograms

parent 410a8378
Branches
Tags
No related merge requests found
......@@ -17,6 +17,8 @@ import Select, { Option } from 'metabase/components/Select'
import SimpleHistogram from 'metabase/xray/SimpleHistogram'
import SimpleStat from 'metabase/xray/SimpleStat'
import Visualization from 'metabase/visualizations/components/Visualization'
type Props = {
fetchFieldFingerPrint: () => void,
fingerprint: {}
......@@ -108,8 +110,30 @@ class FieldXRay extends Component {
</div>
<div className="mt4">
<h3 className="py2 border-bottom">Distribution</h3>
<div className="my4">
<SimpleHistogram data={fingerprint.histogram} legends={false} />
<div className="my4" style={{ height: 300, width: '100%' }}>
<Visualization
className="full-height"
series={[
{
card: {
display: "bar",
visualization_settings: {}
},
data: {
rows: fingerprint.histogram,
cols: [
fingerprint.field,
{
name: "Count",
base_type: "type/Integer"
},
]
}
}
]}
showTitle={false}
/>
</div>
</div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment