Skip to content

Feature Proposal: Implement Data Export Features #15

@NithinRegidi

Description

@NithinRegidi

Feature Proposal: Implement Data Export Features

Problem

Users can visualize data from various IoT sources (MQTT, ThingSpeak, Adafruit, Blynk, Grafana) but cannot export:

  • Charts as images (PNG/JPEG)
  • Raw data as CSV or JSON
  • Only manual row-by-row copying is available (inefficient)

This limits usability for:

  • Sharing dashboards with teams
  • Including data in reports/documentation
  • Offline analysis or external tool integration
  • Enterprise compliance requirements

Solution

Add export functionality using CDN libraries:

  • html2canvas: Convert charts to PNG downloads
  • PapaParse: Convert JSON data to CSV downloads

Add "Export Chart" and "Export Data" buttons to the UI that enable one-click exports.

Implementation Steps

  1. Load CDN libraries in HTML header
  2. Create export utility functions in script.js
  3. Add export buttons to chart blocks and table section
  4. Bind buttons to export functions
  5. Handle file downloads with proper formatting

UI Changes

  • Export Chart button: Next to each chart (top-right of chart block)

    • Exports chart as PNG with filename: chart_[name]_[date].png
  • Export Data button: Above the data table

    • Dropdown/menu with CSV and JSON options
    • Exports with filename: data_[date].csv or .json

Benefits

  • Data Sharing: Users can easily share dashboards + data with teams
  • Reporting: Include professional charts in reports and documentation
  • Integration: Export data for analysis in Excel, Python, R, external tools
  • Compliance: Enable audit trails and data export requirements
  • Competitiveness: Brings OpenDots to parity with other IoT dashboards

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions