Commit Graph
6 Commits
Author SHA1 Message Date
dotCooCoo 386b2e9d30 Merge main into feat/graph-designs-from-other-document 2026-11-17 08:41:51 -08:00
dotCooCoo 5412c911cf Graph Type: Draw Filled Lines takes a Line Width
Graph Type has a Line Width field next to Draw Filled Lines, and
`graph.setType` takes `lineWidth` in points (0.01 to 1000; 3 when the
graph sets none). Filled lines are drawn at that width, and the width is
kept through save and open. A graph stores a width only when it is not
3 pt, and a graph with a width of its own is written to .ai as its art.
`graph.setType` with options that leave the graph as it is records no
undo step.
2026-11-15 12:39:45 -08:00
dotCooCoo 18ffda75dc Graphs: graph designs come in from another document
A document opened with Window > Swatch Libraries > Other Library... now
adds its graph designs to the Column and Marker dialogs, listed under the
library's name after the document's own designs. OK on one of them copies
the design into the document with the swatches, patterns, symbols, styles,
brushes and images its art uses, in the same undo step as the graph
change. graph.column and graph.marker take `library`, graph.design takes
`library` with `add`, and swatch.library.load reports `graphDesigns` and
refuses a file larger than 256 MB before reading it.

The clipboard carries the graph designs that copied graphs draw with, so a
graph pasted into another document brings its designs. A design the
document already has under the same name stays as it is, and a pasted
graph is drawn again with it when it would draw the graph otherwise.
2026-11-14 19:43:53 -08:00
dotCooCoo 23d371ca28 Graphs: graph.setType, setData and create refuse params of the wrong type
graph.setType read `axisMin: "10"` as a cleared bound, so the axis went
back to the calculated range, and it ignored a string or number given for
a true/false option, a string for a number and a number for a text option.
graph.setData and graph.create ignored a `csv` that is not a string and
`series`, `categories` or `rows` that are not lists, and read a string in
`rows` as a blank cell.

The three commands now refuse such a value with an error naming the key,
and leave the graph and the undo history as they were. A null is still
read as a key left out, and a null axis bound still goes back to the
calculated value. A negative tick count is refused too.
2026-11-11 16:41:13 -08:00
Dylan M. Taylor 7043ef6f3d Extract geometry command helpers 2026-10-28 16:44:11 +00:00
aiongg f209d2aba2 refactor(engine): move cmd/graph.rs items to cmd/graph/{axis,columns,commands,data,designs,edit,generate,labels,markers,series}.rs 2026-10-26 22:01:25 +00:00