ข้อมูลอ้างอิงไฟล์ Manifest ของการแสดงภาพข้อมูลจากชุมชน

ไฟล์ Manifest จะให้ข้อมูลเกี่ยวกับการแสดงภาพและระบุตำแหน่งของทรัพยากรการแสดงภาพ โดยควรตั้งชื่อว่า manifest.json และ อยู่ที่ระดับบนสุดของโฟลเดอร์ที่ใช้เป็น Component ID ของคุณ

โดยต้องกำหนดฟิลด์ต่อไปนี้ (ยกเว้นที่ระบุไว้เป็นอย่างอื่น)

ชื่อช่อง Type คำอธิบาย
name string ชื่อแพ็กเกจการแสดงภาพ
organization string ชื่อองค์กรหรือนักพัฒนาแอป
description string คำอธิบายของแพ็กเกจการแสดงภาพ
logoUrl string โลโก้สำหรับแพ็กเกจการแสดงภาพ
packageUrl string ลิงก์ที่ผู้ใช้ติดตามเพื่อดูข้อมูลเพิ่มเติมเกี่ยวกับแพ็กเกจได้
organizationUrl string (ไม่บังคับ) ลิงก์ที่ผู้ใช้ติดตามเพื่อดูข้อมูลเพิ่มเติมเกี่ยวกับองค์กรหรือนักพัฒนาแอปได้
supportUrl string ลิงก์ไปยังหน้าการสนับสนุนหรืออีเมลเพื่อสนับสนุนการแสดงภาพนี้
privacyPolicyUrl string (ไม่บังคับ) ลิงก์ไปยังนโยบายความเป็นส่วนตัว
termsOfServiceUrl string (ไม่บังคับ) ลิงก์ไปยังข้อกำหนดในการให้บริการ
devMode boolean (ไม่บังคับ) หากเป็น "จริง" จะข้ามการแคช ค่าเริ่มต้นของค่านี้คือ false โปรดดูรายละเอียดเพิ่มเติมที่หัวข้อเกี่ยวกับการแคช
components Array(object) การแสดงภาพที่รวมอยู่ในแพ็กเกจ ปัจจุบันรองรับการแสดงภาพเพียงรายการเดียว
components[].id string รหัสของคอมโพเนนต์ ต้องเป็นสตริงที่ไม่ว่างเปล่าและไม่มีการเว้นวรรค
components[].name string ชื่อของการแสดงภาพ
components[].description string คำอธิบายของการแสดงภาพ
components[].iconUrl string ไอคอนสําหรับการแสดงภาพ
components[].infoUrl string (ไม่บังคับ) ลิงก์ที่ผู้ใช้ติดตามเพื่อดูข้อมูลเพิ่มเติมเกี่ยวกับคอมโพเนนต์ได้
components[].resource object แหล่งข้อมูลการแสดงภาพ
components[].resource.js string ตำแหน่งของไฟล์ JavaScript การแสดงภาพใน Google Cloud Storage เช่น gs://GCS_BUCKET_NAME/MY_VISUALIZATION.js
components[].resource.config string ตำแหน่งของไฟล์การกำหนดค่าการแสดงภาพใน Google Cloud Storage เช่น gs://GCS_BUCKET_NAME/MY_CONFIG.json
components[].resource.css string (ไม่บังคับ) ตำแหน่งของไฟล์ CSS การแสดงภาพใน Google Cloud Storage เช่น gs://GCS_BUCKET_NAME/MY_CSS.css
ที่ไม่ซ้ำกัน

ตัวอย่างไฟล์ Manifest ของ manifest.json

{
  "name": "ABC Visualizations Package",
  "organization": "ABC Inc.",
  "description": "A package of cool visualizations.",
  "logoUrl": "https://url",
  "organizationUrl": "https://url",
  "supportUrl": "https://url",
  "privacyPolicyUrl": "https://url",
  "termsOfServiceUrl": "https://url",
  "packageUrl": "https://url",
  "devMode": false,
  "components": [
    {
      "id": "treemap",
      "name": "Treemap",
      "description": "Zoomable treemap with filter interactions",
      "iconUrl": "https://url.png",
      "infoUrl": "https://url",
      "resource": {
        "js": "gs://myViz-bucket-treemap/viz.js",
        "config": "gs://myViz-bucket-treemap/viz-config.json",
        "css": "gs://myViz-bucket-treemap/viz.css"
      }
    },
    {
      "id": "histogram",
      "name": "Histogram",
      "description": "Histogram with filter interactions",
      "iconUrl": "https://url.png",
      "resource": {
        "js": "gs://myViz-bucket-histogram/viz.js",
        "config": "gs://myViz-bucket-histogram/viz-config.json",
        "css": "gs://myViz-bucket-histogram/viz.css"
      }
    }
  ]
}