[graphics] auto colors in TMultiGraph and THStack - #23332
Open
linev wants to merge 7 commits into
Open
Conversation
Use `const TString &opt` as argument instead of `TString opt`. This allows to remove "hide" TString include and allow provide const args. In the function change to lower case to be independent from upper/lower case of provided args
Like in the THStack class, let prepare TGraph objects for painting without real paint. This required by TWebCanvas to have similar handling of THStack and TMultiGraph classes
Sync autocolor handling with new implementation in TMultiGraph
These methods depends from option decoding. But "e" draw option can only be detected after other options like "same" are excluded.
Make code around option usage more clear, do not forget use ToLower when used default option
1. Adjust automatic colors handling in `THStack` and `TMultiGraph`
linev
requested review from
couet,
dpiparo,
guitargeek,
hageboeck and
pcanal
as code owners
September 10, 2026 14:23
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.
Both classes support "PFC", "PLC" and "PMC" draw option to assign auto-colors to histograms and graphs.
THStack provides
BuildPrimitivesmethod to handle autocolors without painting.Now also
TMultiGraph::BuildPrimitives()will be implemented - to let assign autocolors inTWebCanvasImprove code around "PFC", "PLC" and "PMC" options analysis in THStack and TMultiGraph. Use TString instead of plain character manipulations.
Improve
TPad::IncrementPaletteColor()method. Change signature toconst TString &, always convert to lower case to avoid any case mismatchFix
THStack::GetMinimum()/GetMaximum()methods while option string may contain "e" symbols from other draw option.Update TWebCanvas and JSROOT to work with new autocolor functionality in TMultiGraph,
This let avoid several workarounds in the JavaScript code