Repository navigation
Graph Type: combine graph types, one type per series - #959
Merged
Merged
Conversation
Graph Type on series picked with Group Selection (or listed in the new `seriesIndexes` param) now sets the type of those series only, so a column graph can carry a line series: https://helpx.adobe.com/illustrator/desktop/automate-visualize-data/visualize-data/combine-different-graph-types.html - Column, stacked column, line and area mix on the vertical value axis; bar and stacked bar on the horizontal one. Scatter, pie and radar take no other type. The help page doesn't list which types mix, so this is our own choice: types that share the value axis. - Stacked columns take one slot of the column cluster (a graph of stacked columns only is unchanged); stacked series stack with each other, areas with each other, and the value axis covers both totals. - Areas draw at the back, lines in front of columns. Category labels, areas and lines sit at the category centres once a series that isn't edge to edge is in the graph. - With only series selected, the Graph Type query returns their type, so the dialog's OK keeps it, and they stay selected after the change. An explicit `id`, or anything else in the selection, is the whole graph, as before. - A series given the graph's own type follows the graph again. A type the graph's type can't take is drawn as the graph's and kept. Series types are stored in a new `seriesKinds` field, written only when a series has its own type; versions that don't know it draw the whole graph as the graph's type. Graphs of one type draw the same art as before.
bflatastic
force-pushed
the
fix/graph-combine-types
branch
from
October 10, 2026 13:09
6c947a0 to
01a65c4
Compare
Member
|
Thanks again, @IHAGI-c! Merged after a full CI run, rebased onto the current main (#947 had already landed). Combining types per series follows the documented Combine different graph types. Leaving scatter, pie and radar out of mixes is a reasonable reading where the docs only say scatter, and keeping a series' own type when the graph changes is a nice touch. |
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.
Merge #947 first: this branch is on top of it (both change
generate()incrates/engine/src/cmd/graph.rs).Combine graph types, as Combine different graph types describes: pick a series with Group Selection (its legend swatch, then the whole series), then Object › Graph › Type sets the type of that series only. A column graph with a line series, for example.
graph.setTypewith only series of the graph selected appliestypeto those series, and they stay selected afterwards. The other options (column width, points, axis…) still apply to the whole graph. With the graph itself selected, anything else in the selection, or an explicitid, it changes the graph's type as before.graph.setType {}, which fills the Graph Type dialog) returns their type, so OK in the dialog keeps it.seriesIndexes: [index]param (for MCP and scripts). It must be a non-empty list of existing series and comes with atype.Which types mix. The help page doesn't list them, so this is our own choice. Types that share the value axis mix: column, stacked column, line and area on the vertical axis, and bar and stacked bar on the horizontal one. Scatter, pie and radar lay out their data in their own way, so they take no other type. Asking for a type that doesn't mix is an error. If the graph's type is later changed to one the series type can't go in, the series is drawn as the graph's type and keeps its own type for when the graph changes back.
Drawing a mixed graph:
The page's note about stacked columns sharing one axis matters once a graph can have a right axis. That comes in the next PR, with Left/Right/Both and separate scales. Until then every series uses the one value axis.
File format. Series types go in a new
seriesKindsfield (one entry per series,nullfor "the graph's type"), written only when a series has its own type. A version that doesn't know the field ignores it and draws the whole graph as the graph's type, and files without it are unchanged.Graphs of one type draw exactly as before. I checked this by dumping the generated art for all nine types, with Edge-to-Edge Lines on and off, on data with blanks and negatives, before and after this change: the two dumps are byte for byte the same.
ROADMAP: the Graphs entry says what combining does and that a second value axis remains open.
Tested:
idchange the graph's type.seriesIndexes(missing series, empty, negative, not numbers, not a list) andseriesIndexeswithouttype.seriesKindsreads, and none is written back. A stored type the graph can't take is drawn as the graph's type.cargo xtask ci: all 7 steps (fmt, clippy, test, assets, brands, layers, wasm).