A default legend swatch of a stacked column, stacked bar, area or pie
series now has the thin white stroke the series' marks have, beside the
plot or across the top. Before, the swatch had no stroke, so the series
group painted with two strokes and a drawn stacked column or area graph
was saved to .ai as plain art with a warning. Both now open again as live
graphs. Stacked bar graphs are still written as art: the .ai reader has
no type for them.
paint.invert and paint.complement given a group with a fill or stroke of
its own remembered the new paint of the first object inside it, while the
Fill and Stroke proxies show the group's own paint. The remembered paint
now follows the proxy: for each object given, in order, a group whose own
fill or stroke changed gives that paint, otherwise the first object inside
it that is not graph design art does.
paint.invert and paint.complement given a group whose own fill or stroke
changed, with only graph design art inside it, left the last color and
the recent colors as they were, because the remembered paint was taken
only from the objects inside the group. It now comes from the first
group whose own fill or stroke changed. A recolor that changes no
group's paint, such as the complement of a gray fill, remembers nothing.
With the art of a graph design in a series given first and aligned: true,
effect.remove and effect.duplicate with `indices` skipped an effect of the
art that no other object has, and edited the others. With art [shadow,
roughen], a mark [shadow] and indices [0, 1], effect.remove took the
mark's shadow off and succeeded. Such an edit is now an error that leaves
the document and its undo history as they are, as the same index given
alone already was. An object that lacks one of the effects while another
object has it is still left out for that effect.
paint.invert and paint.complement given only the art of a graph design,
with no item, returned success for a target other than "object" or
"contents", because the topmost-fill path read the target only after the
early return for design art. The target is now read before that return.
appearance.addFill and appearance.addStroke on an axis line, tick mark
or radar ring stored only the attributes the new row changed on the
line, so a stroke the kind kept from another line came back when the
graph was drawn again, although the line showed the new black stroke.
They now store the row they add for the line's kind when it becomes the
line's topmost visible row of its kind.
An appearance.copyFrom of some attributes, appearance.setItem and
stroke.set stored only what they changed, so a paint, stroke weight,
row opacity or blend mode that the line already showed did not replace
what its kind kept. What they write to the line's topmost visible rows
is now stored for the kind, as paint.setStroke stores the paint it
writes. Row opacity and blend mode are stored apart, so an edit of one
leaves the other as the kind keeps it, and a null weight or opacity
writes nothing.
Expand Appearance leaves the art of a graph design in a series as it is. A Transform effect of a
series group that makes copies gave each copy new ids, so the copies were expanded and their own
effects, such as a drop shadow, became embedded images. The new ids of those copies are now left out
too; the series group's own effect still bakes into them.
paint.invert and paint.complement without an item recolor a given group's own fills and strokes with the objects inside it again, except with target "contents", and leave the art of graph designs inside it as it is. A given member of a compound path stands for the compound path.
paint.editGradient with a spread or a negative aspect for design art alone no longer checks it against the kind of the default gradient, so it changes nothing instead of failing. A bad value is still an error.
graphicStyle.apply with add, and appearance.copyFrom with append, stored
both the fill and stroke rows a graph label or axis line showed, so a
fill-only style added to one axis line replaced the stroke the axis lines
kept from another line with the line's own black stroke. They now store
only the kinds of row they add; the row of the other kind keeps its paint
and its place relative to the characters as the kind keeps them.
appearance.moveItem of the Contents row stored the rows of every label
it was given, so a move that changed nothing on a label replaced what its
kind kept from another label. It now stores rows only for the labels
whose rows it changed.
With only the art of a graph design in a series given or selected, paint.invert and paint.complement without an item recolored that art and remembered its new color, and stroke.set with a weight set the stroke weight for new art. Invert and Complement now leave the art out, as they do with an item, also when they are given the whole graph or a series group, and with only design art they change nothing. stroke.set with only design art leaves the weight for new art as it is.
An item the art has no row of that kind for is still an error in the commands that leave the art out, as on any other object, and so is a bad aligned or target param. Without stroke, paint.editGradient and paint.setGradientGeom read the kind of an item named on design art alone from that art's row.
paint.setFill, paint.setStroke, addon.color.fillToStroke and
addon.color.strokeToFill on an axis line, tick mark or radar ring that
already showed the paint they write stored nothing, so a paint its kind
kept from another line came back when the graph was drawn again. The
paint written to the line's topmost visible fill or stroke row is now
stored for its kind; its other attributes stay as the kind keeps them.
Takes #7375's later fixes: Move Appearance onto an axis line behind its
source, picks and added styles without transparency, Default Fill and
Stroke on an axis line, and edits that keep only the line attributes they
change. Aligned row edits, hidden rows, reorders and Default Fill and
Stroke on labels keep this branch's behavior.
A no-op appearance.moveItem on a graph axis line or label replaced the
rows its kind keeps with the line's own. The reorder now keeps rows only
for the lines and labels whose rows it changed.
text.setStyle keeps the default label style for a kind only when the
command gives a character attribute; justify-only and empty
featureChanges requests record nothing.
A quoted CSV cell keeps its line breaks, and a category or series label
draws each one as a new line, as it does a `|`. Labels beside an axis or
in a wedge counted their lines by `|` alone, so a label with a line break
was set off center, and with kept leading or paragraph spacing it was
not moved back to its middle when the graph was drawn again. The label
now counts lines in the text it lays out.
Follow-up to #6574.
- Outline Stroke on a graph's strokes, including Object > Expand with
Stroke on, adjusts the bounds the graph keeps, the same way
Create Outlines on its labels does. Before, the stroke outlines
changed the bounds of the art without type, and the next redraw
stretched the plot by the width the outlines added.
- A graph that keeps `placedArt` and has no art other than type left
is no longer measured on the bounds of all its art. A label edit on
such a graph moved and stretched the plot at the next redraw; the
plot now stays where it is.
- A redraw no longer measures a move or scale on art that has no width
or no height now, such as a graph left with one axis line. Before,
the plot collapsed to no width.
- A clipping group in a graph that holds type is measured on its clip
when the clip does not depend on type, so moving art outside the clip
does not change the bounds. Blends, envelopes and repeats are
measured whole, as they are drawn.
- The doc crate's helper is named `graph_art_without_type` and sits
with the file's other free functions.
- docs/mcp.md lists Outline Stroke and states that moving an outlined
label, a swatch, an axis or a tick mark on its own can move or scale
the plot, and that a graph left with only labels, or with art that
has no width or height, does not follow a move.
- Tests: a scale of the graph made before outlining a label, a move of
a graph opened from `.ai` after its label is restyled and moved,
Outline Stroke after a move, a graph left with only its labels or
with one line, and clipping groups holding type.
With only the art of a graph design in a series given or selected, paint.editGradient still set the default fill or stroke and the remembered paint, paint.swap swapped the default fill and stroke, paint.default reset them, and paint.invert and paint.complement with an item remembered the art's color. Each now returns without changing anything. An empty selection still edits the defaults as before.
Default Fill and Stroke on an axis line, tick mark or radar ring that already
shows the default paint now stores the default fill and stroke rows for every
line of its kind, so a stroke the kind kept from another line no longer comes
back when the graph is drawn again. The object opacity and blend mode the
kind keeps stay as they are.
- appearance.moveItem with from "contents" and aligned: true is refused when
the objects' stacks differ, as it is for rows.
- paint.invert and paint.complement with an item remember the paint of an
object they recolored, not that of design art they left out.
- effect.remove and effect.duplicate with indices and aligned: true are an
error, and change nothing, when the design art given first has no effect
at one of the indices.
A whole pick of every fill and stroke attribute, or an append pick, onto
a graph's axis line, tick mark or radar ring stored the line's rows in
full, object opacity and blend mode included, even when the pick did not
apply the object's transparency. On a line that still showed 100% until
the graph was drawn again, that replaced the opacity its kind kept (40%
set on another line became 100%). An append pick onto a graph label, and
graphicStyle.apply with add on a label or line, did the same.
Without Transparency applied, these picks, and a style added on top, now
store the fill and stroke rows and leave the kept object opacity and
blend mode as they were.