Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,6 @@ rustflags = ["-C", "target-feature=+crt-static", "--cfg=web_sys_unstable_apis"]
[future-incompat-report]
frequency = 'never'

# TODO This is required to synth public releases on GH Actions, which doesn't
# use the root `Cargo.toml`.
[patch.crates-io]
perspective-client = { path = "rust/perspective-client" }
perspective-server = { path = "rust/perspective-server" }
perspective-js = { path = "rust/perspective-js" }
perspective-python = { path = "rust/perspective-python" }
perspective-viewer = { path = "rust/perspective-viewer" }
perspective = { path = "rust/perspective" }

[unstable]
bindeps = true

Expand Down
14 changes: 14 additions & 0 deletions .cargo/release.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Path overrides for synthesizing public releases (`cargo package` /
# `cargo publish`). Packaging resolves an ephemeral copy of each crate
# _outside_ the workspace, so the `[patch.crates-io]` table in the root
# `Cargo.toml` does not apply there; without these overrides the not yet
# published perspective-* versions would fail to resolve (or resolve to stale
# crates.io copies). This file is not loaded automatically - pass it
# explicitly with `cargo --config .cargo/release.toml` from the repo root.
[patch.crates-io]
perspective-client = { path = "rust/perspective-client" }
perspective-server = { path = "rust/perspective-server" }
perspective-js = { path = "rust/perspective-js" }
perspective-python = { path = "rust/perspective-python" }
perspective-viewer = { path = "rust/perspective-viewer" }
perspective = { path = "rust/perspective" }
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ jobs:

- name: Package
if: ${{ !contains(matrix.os, 'windows') && steps.config-step.outputs.FULL_RUN }}
run: cargo package --no-verify --allow-dirty -p perspective -p perspective-viewer -p perspective-js -p perspective-client -p perspective-server -p perspective-python
run: cargo package --config .cargo/release.toml --no-verify --allow-dirty -p perspective -p perspective-viewer -p perspective-js -p perspective-client -p perspective-server -p perspective-python

- uses: actions/upload-artifact@v4
if: ${{ !contains(matrix.os, 'windows') && steps.config-step.outputs.FULL_RUN }}
Expand Down
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 12 additions & 1 deletion packages/viewer-charts/src/ts/charts/series/glyphs/draw-areas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,9 @@ export class AreaGlyph {
/**
* Bind persistent strip buffers and dispatch one TRIANGLE_STRIP per
* series-run. Skips hidden series. `splitFilter` (faceted frames)
* draws only the series whose `splitIdx` matches.
* draws only the series whose `splitIdx` matches; `aggRange` (mixed
* glyph-run frames) only those whose `aggIdx` lies in the inclusive
* run span.
*/
draw(
chart: SeriesChart,
Expand All @@ -198,6 +200,7 @@ export class AreaGlyph {
projRight: Float32Array,
opacity: number,
splitFilter?: number,
aggRange?: { start: number; end: number },
): void {
const buf = this._buffers;
const cache = this._program;
Expand All @@ -221,6 +224,14 @@ export class AreaGlyph {
continue;
}

const aggIdx = chart._series[s.seriesId].aggIdx;
if (
aggRange !== undefined &&
(aggIdx < aggRange.start || aggIdx > aggRange.end)
) {
continue;
}

gl.uniformMatrix4fv(
cache.u_projection,
false,
Expand Down
13 changes: 12 additions & 1 deletion packages/viewer-charts/src/ts/charts/series/glyphs/draw-lines.ts
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,9 @@ export class LineGlyph {
* per series. Skips hidden series via `_hiddenSeries`. Gap /
* transparency rendering is governed by `u_interp_alpha`, set per
* series. `splitFilter` (faceted frames) draws only the series
* whose `splitIdx` matches — one call per facet.
* whose `splitIdx` matches — one call per facet. `aggRange` (mixed
* glyph-run frames) draws only the series whose `aggIdx` lies in
* the inclusive run span.
*/
draw(
chart: SeriesChart,
Expand All @@ -281,6 +283,7 @@ export class LineGlyph {
projLeft: Float32Array,
projRight: Float32Array,
splitFilter?: number,
aggRange?: { start: number; end: number },
): void {
const buf = this._buffers;
const cache = this._program;
Expand Down Expand Up @@ -319,6 +322,14 @@ export class LineGlyph {
continue;
}

const aggIdx = chart._series[s.seriesId].aggIdx;
if (
aggRange !== undefined &&
(aggIdx < aggRange.start || aggIdx > aggRange.end)
) {
continue;
}

gl.uniformMatrix4fv(
cache.u_projection,
false,
Expand Down
22 changes: 17 additions & 5 deletions packages/viewer-charts/src/ts/charts/series/glyphs/draw-scatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -268,9 +268,9 @@ export class ScatterGlyph {
/**
* Bind the persistent left/right buffers and issue up to two draw
* calls. No per-frame allocations or buffer uploads. `splitFilter`
* (faceted frames) instead draws each matching series' contiguous
* bucket sub-range — one `drawArrays(POINTS, first, count)` per
* series of the facet.
* (faceted frames) and/or `aggRange` (mixed glyph-run frames)
* instead draw each matching series' contiguous bucket sub-range —
* one `drawArrays(POINTS, first, count)` per matching series.
*/
draw(
chart: SeriesChart,
Expand All @@ -279,6 +279,7 @@ export class ScatterGlyph {
projLeft: Float32Array,
projRight: Float32Array,
splitFilter?: number,
aggRange?: { start: number; end: number },
): void {
const buf = this._buffers;
const cache = this._program;
Expand All @@ -297,9 +298,20 @@ export class ScatterGlyph {
chart._pluginConfig.point_size_px * dpr,
);

if (splitFilter !== undefined) {
if (splitFilter !== undefined || aggRange !== undefined) {
for (const r of buf.seriesRanges) {
if (chart._series[r.seriesId].splitIdx !== splitFilter) {
if (
splitFilter !== undefined &&
chart._series[r.seriesId].splitIdx !== splitFilter
) {
continue;
}

const aggIdx = chart._series[r.seriesId].aggIdx;
if (
aggRange !== undefined &&
(aggIdx < aggRange.start || aggIdx > aggRange.end)
) {
continue;
}

Expand Down
Loading
Loading