Repository navigation
Render: draw chart trendlines - #603
Merged
h-a-n-a-s-h-i merged 3 commits intoOct 14, 2026
Merged
Conversation
An owned corpus slice checks combo charts with data labels, merged tables with diagonal borders, and text columns, autofit, vertical text and a WordArt warp. Trendlines (type, order, period, forecast, intercept, equation and R²) are now read and written.
Fit linear, exponential, logarithmic, polynomial, power and moving-average lines, including forecast, and draw them with the equation and R² label.
PowerPoint does not show R² for a moving average, and the value can be negative. The line is still drawn.
h-a-n-a-s-h-i
pushed a commit
that referenced
this pull request
Oct 14, 2026
#640 orders category slots bottom-to-top on horizontal bars (or reversed via c:orientation) while #603 pads the axis for trendline forecasts. Slots now include the forecast padding on the right side, and trendlines map their category positions through the same slot order as the bars. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
h-a-n-a-s-h-i
pushed a commit
that referenced
this pull request
Oct 14, 2026
Member
|
Thank you for this contribution, @NikitkaRa! It has landed on If you haven't already, please come join us on Discord: https://discord.gg/artcraft |
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.
Summary
Stacked on #590. Upstream can't use a fork branch as the base, so this PR targets main and also contains #590's commit; please review only the last commits. The diff shrinks once #590 merges.
Chart trendlines are drawn. Linear, exponential, logarithmic, polynomial (order 2–6), power, and moving average are fitted from the series, including a forecast, and stroked as a dashed line. When the file asks for the equation or R², that label is placed in an open corner of the plot. A moving average has no equation, and its R² is not drawn. The value axis grows to include the fit, with a bound so a wild polynomial cannot flatten the chart.
Secondary-axis export stays with #255. The chart-elements row stays partial.
Test plan
cargo fmt --all -- --checkandcargo clippy --workspace --all-targets -- -D warnings(follow-up commit checked with-p deckcraft-model)cargo test --workspacewith three known environment-only failures skipped (craft-fonts missing on that machine):symbol_font_characters_draw_in_the_sym_font,korean_composes_in_the_notes_pane,cjk_text_in_the_interface_is_drawn_with_real_glyphsmoving_average_shows_neither_equation_nor_r2cargo xtask assets,cargo xtask layers, andcargo xtask wasmy = 2x + 1,y = 0.5e^(0.693x),y = ln(x),y = x²,y = 2x^0.5.