Feature/axis and line options - #144
Open
PA (EquinetPaul) wants to merge 5 commits into
Open
Conversation
Author
|
@microsoft-github-policy-service agree |
Adds a Label Area Sizing option (Auto / Fixed) to the Y axis and the secondary Y axis. Auto keeps the upstream behaviour of sizing the label area from the rendered labels. Fixed reserves exactly the configured pixel width (clamped to half of the viewport so the plot area cannot collapse on small tiles), so stacked visuals keep their plot areas aligned when filters change the magnitude of the displayed values. Labels wider than the reserved area are ellipsised through the existing getTailoredTextOrDefault helper.
Adds a third value to the Line > Type dropdown that renders each data point as a standalone circle instead of a connecting path. The new ScatterComponent is a sibling of LineComponent and AreaComponent behind the existing ComboComponent dispatch, and reuses the current value dot sizing (thickness * radius factor) and per-point colors, so KPI color segments, selection, highlight and high contrast keep working unchanged. Points without a value are skipped rather than interpolated over. The line shape settings that cannot apply to standalone points (interpolation and line style) are hidden when Scatter is selected.
Pins the X axis range instead of fitting it to the data, mirroring what the Y axis cards already offer. The boundaries are applied to the axis representation just before the scale is built, the same way postProcess applies the Y boundaries: an empty setting keeps the computed bound and an inverted pair is reordered so the scale never receives a reversed domain. The input matches the axis type - numeric fields on a numeric axis, date fields on a date axis, neither on a categorical axis, whose domain is a list of categories rather than a range. Date boundaries are typed as text because the formatting API exposes no date property type; an entry that cannot be read as a date is ignored so a typo falls back to the computed bound instead of collapsing the axis.
Adds a Zoom Slider formatting card, off by default, that shows a zoom slider on the X axis, the Y axis or both. Each slider narrows its axis to the range kept between its two handles, applied to the domain next to the boundaries the author pinned, so zooming stays relative to the axis actually on screen. The X axis slider is offered only on a date or a numeric axis: a categorical axis has no range to narrow, its domain being the list of categories. The guard sits both in the pane and at render time, since the field can be swapped for a text column while the setting stays on. Each slider spans the drawing area rather than the plot container, and its track is inset by a handle radius so a handle at either end stays inside the slider. The zoom is view state: it lives in the visual across renders, is never persisted, and resets whenever Power BI pushes an update. The chart is rebuilt when a drag ends rather than on every pointer move, since a rebuild re-runs the whole data pipeline. Also confines the chart marks to the drawing area. A narrowed range still maps every point through the scale, so the points outside it land far beyond the drawing area, and nothing clipped that: the chart SVG is set to overflow: visible and the only clipping boundary is the plot, which the Y axis lives inside. The marks were painted across the Y axis labels and out to the edge of the tile - 1428 px left of the plot at 1024x768 with a pinned axis, 362 px at 300x200 after one drag. The clip covers the drawing area grown by the margin reserved for dot radii, and applies to the marks only, so the labels, the hover dots, the vertical line and the clear catcher keep their behaviour. It guards every way the range can be narrowed, including the Y axis Min/Max the visual already offered, where the overflow was a pre-existing defect.
PA (EquinetPaul)
force-pushed
the
feature/axis-and-line-options
branch
from
August 16, 2026 10:33
f72165e to
d2ced2b
Compare
Author
|
Note on the version bumps: each commit bumps |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Four formatting options for the chart axes and lines. Each is a self-contained
commit with its own version bump, and each defaults to the current behaviour, so
an existing report renders unchanged after the merge.
Label Area Sizing(Auto / Fixed) on both Y axes: reserves a fixedpixel width for the label area, so stacked visuals keep their plot areas aligned
when a filter changes the magnitude of the displayed values.
Scatteradded to Line > Type: renders each data point as astandalone circle instead of a connecting path.
Min/Maxon the X axis: pins the axis range instead of fittingit to the data, mirroring what the Y axis cards already offer.
Zoom Slidercard: a zoom slider on the X axis, the Y axis or both,narrowing the axis to the range kept between its two handles.