JBorgia opened a new issue, #502:
URL: https://github.com/apache/echarts-doc/issues/502
## Bug report
### Version
Apache ECharts 6.0.0
### What is expected?
When `dataZoom` is configured with `type: 'slider'` and `showDataShadow:
true` on a chart with multiple series, the shadow in the slider should provide
a representative overview of the chart data.
In particular, it should not depend on a sparse or otherwise
unrepresentative first eligible series when another eligible series provides a
better overview.
### What is actually happening?
In multi-series charts, the slider shadow appears to be derived from a
single internally chosen representative series.
This can produce a misleading or apparently broken shadow when:
- the first eligible series is sparse
- a later eligible series is denser and better represents the visible data
- the chart contains a mix of sparse and dense series on the same controlled
axis
As a result, the slider shadow can be inconsistent with what the user sees
in the main chart.
### Reproduction
A minimal reproduction is a chart with:
- `dataZoom: [{ type: 'slider', showDataShadow: true }]`
- multiple series sharing the same axis
- the first eligible series containing only a few points
- a later eligible series containing dense regular data
In that setup, the slider shadow is driven by the sparse series rather than
the denser, more representative one.
### Why this is a problem
`showDataShadow` acts as a visual summary of the chart. If the chosen source
series is sparse or unrepresentative, the shadow no longer serves that purpose
and can look broken even though the main chart is correct.
### Suggested direction
A good solution might combine explicit control with improved default
behavior:
1. Add an explicit override such as `shadowSeriesIndex` on
`dataZoom.slider`, so users can choose which eligible series drives the shadow
when needed.
2. Improve the current automatic behavior so that when no explicit override
is provided, the shadow uses a more representative eligible series instead of
simply the first one found.
3. In auto mode, if the selected candidate is too sparse to produce a
meaningful shadow, prefer a better candidate or fall back to no shadow rather
than a misleading one.
This would preserve backward compatibility, improve the default behavior for
existing charts, and give users deterministic control when necessary.
### Notes
This is distinct from the `timeline` component. The issue is in the
`dataZoom-slider` shadow behavior.
I would be happy to help with a PR if this direction makes sense.
The first screenshot shows the failure mode. The second screenshot is
included only as a comparison for the kind of overview behavior users expect
from `showDataShadow`.
<img width="2232" height="403" alt="Image"
src="https://github.com/user-attachments/assets/ef310709-4fbd-42e5-bb1f-e68e7efdb33a"
/>
<img width="2216" height="517" alt="Image"
src="https://github.com/user-attachments/assets/a0ece1cd-1d7a-4698-a80b-83d22f0dafc9"
/>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]