import "./App.css";
import { cn, GenieQueryVisualization } from "@databricks/appkit-ui/react";
const exampleSchema = {
format: "JSON_ARRAY",
schema: {
column_count: 5,
columns: [
{
name: "FinancialYear",
type_text: "DATE",
type_name: "DATE",
position: 0,
},
{
name: "ARDRG_Version",
type_text: "STRING",
type_name: "STRING",
position: 1,
},
{
name: "ARDRG_Code",
type_text: "STRING",
type_name: "STRING",
position: 2,
},
{
name: "ARDRG_Description",
type_text: "STRING",
type_name: "STRING",
position: 3,
},
{
name: "AvgLOS_Inpatient",
type_text: "DOUBLE",
type_name: "DOUBLE",
position: 4,
},
],
},
total_chunk_count: 1,
chunks: [{ chunk_index: 0, row_offset: 0, row_count: 4111 }],
total_row_count: 4111,
truncated: false,
};
const exampleDataArray = [
[
"2026",
"10.0",
"I69A",
"Bone Diseases and Arthropathies, Major Complexity",
"6.0",
],
[
"2026",
"11.0",
"I69A",
"Bone Diseases and Arthropathies, Major Complexity",
"52.0",
],
[
"2026",
"8.0",
"T01A",
"Infectious and Parasitic Diseases W OR Procedures, Major Complexity",
"4.0",
],
[
"2026",
"8.0",
"J65A",
"Trauma to Skin, Subcutaneous Tissue and Breast, Major Complexity",
"4.0",
],
];
function App() {
const queryResult = {
manifest: {
schema: exampleSchema["schema"],
},
result: {
data_array: exampleDataArray,
},
};
return (
<>
<section id="center">
<div style={{ height: 600 }}>
<GenieQueryVisualization data={queryResult} />
</div>
</section>
</>
);
}
export default App;
Hello,
I am using GenieQueryVisualization component in a standalone react app to render data obtained via the Genie API.
Please see screenshot attached inline.
Two questions:
Tabletab is clicked.Thanks,
Amit.
Example component