appkit-ui - Using GenieQueryVisualization not working as expected

Đang mở
#403 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 3 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
45/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
react, typescript
Lĩnh vực
frontend

Hướng nghiên cứu

Bắt đầu với tài liệu GenieQueryVisualization và component ví dụ trong issue, sau đó tái hiện hành vi của ứng dụng React độc lập bằng dữ liệu queryResult được cung cấp. Kiểm tra xem các control của bảng mặc định và loại biểu đồ có khớp với hành vi được ghi trong tài liệu của component hay không; được xem là hoàn tất khi hành vi render tab và biểu đồ mong đợi đã được xác nhận hoặc được ghi lại rõ ràng.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Hello,

I am using GenieQueryVisualization component in a standalone react app to render data obtained via the Genie API.

Please see screenshot attached inline.

Image

Two questions:

  1. Is the table always supposed to be rendered by default? I would have expected it to only show when Table tab is clicked.
  2. Not sure why the chart type selection is rendered on the chart?

Thanks,
Amit.

Example component

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;

Ngôn ngữ chính
TypeScript
Star
119
Fork
36
Merge trung bình
4 ngày 16 giờ
Pull request đã merge (30 ngày)
37

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của databricks/appkit

Tất cả issue của databricks/appkit

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.