Skip to content

Issue #5 - [BUG] Bar Chart X-axis time formatting stuck on adaptive mode #8

@zenocross

Description

@zenocross

Description

In Bar Charts, when attempting to configure X-axis time formatting, the setting is not applied correctly. The chart always uses "Adaptive" formatting regardless of the user's selected format.

Current Behavior

  • User selects specific time format for X-axis (e.g., "%Y-%m-%d")
  • Chart saves the configuration
  • Chart still renders using Adaptive formatting
  • User's time format preference is ignored

Expected Behavior

  • User selects desired time format from dropdown
  • Chart applies the selected format to X-axis labels
  • Time values display in chosen format
  • Format persists across chart refreshes

Steps to Reproduce

  1. Create a Bar Chart with time series data on X-axis
  2. Go to chart configuration
  3. Find X-axis time format settings
  4. Select a specific format (not "Adaptive")
  5. Save and refresh chart
  6. Observe X-axis still uses Adaptive formatting

Root Cause

The issue occurs because the X-axis configuration is missing the proper format settings. The chart defaults to Adaptive mode when the configuration is incomplete or not properly passed to the ECharts component.

Proposed Solution

  • Ensure X-axis format configuration is properly extracted from chart settings
  • Pass format configuration to ECharts options
  • Add test cases covering different time format scenarios
  • Verify format applies correctly and persists

Technical Context

  • Component: Bar Chart (ECharts-based)
  • Involves: Chart configuration parsing, ECharts options generation
  • Requires: Understanding of ECharts time axis configuration
  • Testing: Multiple test cases for different formats needed

Download https://cap.so/ to record your screen (use Studio mode). Export as an mp4, and drag and drop into an issue comment below.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions