GitHub user simon-cerda created a discussion: Custom Line Style 
(Dashed/Solid/Dotted) per Series in ECharts Line & Mixed Charts

### Is your feature request related to a problem? Please describe.
Currently, in Apache Superset (tested on 4.x, 5.x, and checking 6.0.x beta), 
the "Dashed" line style is exclusively reserved for **Time Shift** comparisons 
(e.g., "vs 1 year ago").

There is no native way in the UI to manually set a specific metric (series) to 
be displayed as a **dashed line**.
This is a critical limitation for business dashboards that need to compare 
**Actual vs. Budget/Target** or **Forecast vs. Real**, where the standard 
convention is to use a solid line for "Actual" and a dashed line for 
"Budget/Target" without relying on time-shifts.

### Describe the solution you'd like
I propose adding a control in the **Customize** tab (or within the specific 
Series configuration in Mixed Charts) to override the `lineStyle`.

**Preferred UX:**
In the "Customize" tab, under a new "Series Style" section:
1. Select the Metric/Series name.
2. Select Line Type: `Solid` (Default) | `Dashed` | `Dotted`.

**Technical Context:**
Since Superset uses Apache ECharts, this is natively supported by the library 
via `series.lineStyle.type`.
Currently, `transformProps.ts` seems to hardcode this logic based solely on the 
`isTimeShift` boolean. We need a way to pass a manual override prop to the 
ECharts generator.

### Describe alternatives you've considered
1. **Time Shift Hack:** Users are currently forcing fake time comparisons to 
get dashed lines, which messes up the tooltips and legend labels.
2. **CSS Hacks:** Impossible because ECharts renders on Canvas, not DOM 
elements.
3. **JSON Metadata:** There is no exposed property in the Chart's JSON metadata 
to inject custom series styles in the current versions.

### Additional context
As Superset moves towards v6.0 with the Ant Design system, adding granular 
control over visual data representation would be a huge win for data 
storytelling.

We are looking to implement this for charts like:
- Revenue (Solid) vs. Revenue Goal (Dashed)
- Temperature (Solid) vs. Threshold (Dashed)

GitHub link: https://github.com/apache/superset/discussions/36493

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: 
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to