summaryrefslogtreecommitdiffhomepage
path: root/lib/axlsx/drawing/chart.rb
AgeCommit message (Collapse)Author
2023-06-13Fix safe Style/Lambda offensesGeremia Taglialatela
- Use literal syntax on single line - Use lambda method on multiple lines Ref: https://rubystyle.guide/#lambda-multi-line
2023-06-10Fix safe Style/ColonMethodCall offensesGeremia Taglialatela
Caxlsx is using both `.` and `::`, 220 occurrences vs 280 to invoke methods on `Axlsx` module. This commit standardizes the approach towards `.`, which will also allow shorter lines. Performance is not affected ``` Comparison: Axlsx.validate: 8515252.3 i/s Axlsx::validate: 8512863.7 i/s - same-ish: difference falls within error ```
2023-06-05Prefer `Kernel#format` to `String#%`Geremia Taglialatela
This commit fixes cases that cannot be detected by RuboCop Ref: https://www.rubydoc.info/gems/rubocop/RuboCop/Cop/Style/FormatString
2023-06-05Fix Style/RedundantInterpolation offensesGeremia Taglialatela
`%` is an operation on `String` that will return a new `String`, so the interpolation is redundant Also adds a missing spec on PivotTable#rels_pn ``` IPS: uninterpolated: 4045715.7 i/s interpolated: 2359775.6 i/s - 1.71x (± 0.00) slower Memory: uninterpolated: 160 allocated interpolated: 232 allocated - 1.45x more ```
2023-05-31Use Ruby 1.9 hash syntaxGeremia Taglialatela
2023-05-05Pipe output directly to str and avoid additional memory allocationsPaul Kmiec
Currently, there are lots of examples of code like this, ``` str << ('<tag ' << foo << ' ' << bar << '/>') ``` which create the string for the tag in memory before piping to str. We can avoid creating all of these intermediate strings by dropping the paranthesis and piping directly to str. This relies on the `str` passed around to handle lots of small appends. This is a problem when using RubyZip, but that is solved in the next commit.
2023-05-04Fix tests / code to work with frozen string literalsPaul Kmiec
2023-05-04Enable Style/FrozenStringLiteralComment and autocorrectPaul Kmiec
2023-05-03Fix safe, minor offenses to production codeGeremia Taglialatela
- Lint/RedundantStringCoercion - Style/CommentAnnotation offenses - Style/DefWithParentheses - Style/EvalWithLocation - Style/MethodCallWithoutArgsParentheses - Style/MethodDefParentheses - Style/NilComparison - Style/Semicolon
2023-04-10Fix Layout/LeadingCommentSpace offensesGeremia Taglialatela
``` rubocop --only Layout/LeadingCommentSpace -a ```
2023-04-08Fix space-related offensesGeremia Taglialatela
- Layout/SpaceAfterComma - Layout/SpaceAroundEqualsInParameterDefault - Layout/SpaceAroundOperators - Layout/SpaceBeforeBlockBraces - Layout/SpaceInsideBlockBraces - Layout/SpaceInsideHashLiteralBraces - Layout/SpaceInsideParens
2023-04-08Fix EmptyLines related offensesGeremia Taglialatela
2023-04-06Fix Style/Encoding offensesGeremia Taglialatela
``` rubocop --only Style/Encoding -a ```
2022-06-05Implement “rounded corners” setting for chartsStefan
Until now this setting was not present in the generated XML. According to the ECMA spec the setting defaults to true, so charts always had rounded corners. Now rounded corners can be disabled explicitly.
2022-06-01Implement “plot visible only” setting for chartsStefan
Until now this setting was hardcoded to `true`. The setting affects whether data from hidden cells (cells width zero height or width) is used when plotting the chart.
2022-05-18Completely hide chart titles if blankStefan
Before this change, a chart with a blank title would show up in Excel with a default title like “Chart title” or “Diagrammtitel”. It was not possible to completely hide a chart title: Setting it to an empty space would override Excel’s default, but the empty title did still occupy vertical space. Per OOXML standard the `title` element is optional, so omitting it if the title is blank looks like the right thing to do and seems to work correctly in Excel.
2017-04-01chore(doc): document some membersrandym
2015-07-28chart.rb: added method to set font size of Title object in chartErik Veijola
Signed-off-by: Erik Veijola <[email protected]>
2015-03-14Merge pull request #377 from shifakhan/charts_background_colorJurriaan Pruis
Background color option for charts
2015-03-03Minor changeBrad Stewart
2015-03-03Fix commentsBrad Stewart
2015-03-03Allow legend position to be set on chartsBrad Stewart
2015-02-21Background color option for chartsshifakhan
2014-02-26Huge refactoringJurriaan Pruis
Do not create huge strings Let Row inherit from SimpleTypedList Optimized sanitizing Optimized validation And more..
2013-07-08Make relationship ids more reliable.Stefan Daschek
Relationship instances now keep track of their own id – this should be much more reliable than the old way of more or less “guessing” the relationship id based on the position of some object in some array. Fixes https://github.com/randym/axlsx/issues/212, especially. Each relationship now has its own, unique id – except for the cases when it doesn’t: Some relationships need to share the same id, see `Relation#should_use_same_id_as?` for the gory details. All tests pass, and the full example.xlsx is generated without errors and looks fine in Excel for Mac 2011. The pivot table example still has the problems mentioned in https://github.com/randym/axlsx/issues/168 – but as far as I can tell I didn’t make it worse (Excel is still be able to “repair” the file, and the repaired file then contains the pivot table).
2013-06-23fixed bad test case and bad code for dispBlanksAs (setting now actually ↵Moses Hohman
makes it into XML) This means there are many other test cases in the suite that are not verifying what they look like they're verifying.
2013-06-23provide a better default for dispBlanksAs and allow it to be configuredMoses Hohman
2013-01-23Updated chart vary_colorsRandy Morgan
This sets the proper default for each chart type and lets us change it as we need.
2013-01-15Refactored relationship management for drawingsRandy Morgan
This should fix #160
2012-11-23Updated thin_chars and replaced cover_me with simplecovRandy Morgan
2012-10-14Refactored to use options parserRandy Morgan
2012-08-02hmm…. ditch red carpet and do some docsRandy Morgan
2012-07-23more cleanup for optional data label attributesRandy Morgan
2012-07-18#113 implement data labels for pie chartsRandy Morgan
2012-07-14refactoring of some helper methods in chartRandy Morgan
2012-07-10more cleanupRandy Morgan
2012-07-03add in default printing options for charts so that they are added when ↵Randy Morgan
exporting to pdf from LibraOffice
2012-07-03more work on snake case standardizationRandy Morgan
2012-06-05fix chart title parsing to properly handle non-cell based text runsRandy Morgan
2012-05-03add support for axis delete, cat axis tickLblSkip and tickMarkSkip with ↵Randy Morgan
sensible defaults. Improve chart positioning defaults.
2012-05-03bug fix - end_at should not be dependent on :start_at optionRandy Morgan
2012-04-03pre-release cleanupRandy Morgan
2012-04-01rebuild all serialization to use string concatenation instead of nokogiri.Randy Morgan
2012-04-01part way through changing all serialization to use string concatenation ↵Randy Morgan
prior to dropping Nokogiri dep in production.
2012-03-29Implement full set of col attributes and improve performance of autowidth ↵Randy Morgan
two fold. ``` user system total real axlsx_noautowidth 0.810000 0.020000 0.830000 ( 0.836274) axlsx 1.430000 0.160000 1.590000 ( 1.776305) axlsx_shared 9.360000 0.160000 9.520000 ( 9.662113) axlsx_stream 1.320000 0.110000 1.430000 ( 1.429806) csv 0.260000 0.020000 0.280000 ( 0.296828)
2012-02-22shadowed vars and bad indentation. shame, shame on meRandy Morgan
2012-02-14Stomp out all warnings.Randy Morgan
"Method calls with expanded arrays require parentheses" Thanks rspec - I didn't know that.
2012-02-12Adding in support for optionally using the shared strings table. This will ↵Randy Morgan
allow us to inter-op properly with Numbers
2012-01-18remove linebreaks/indentation when saving to encourage interop with rubyXLRandy Morgan
https://github.com/randym/axlsx/issues/19
2011-12-08cleaning up xml namespace usage in drawings and improving looks for charts ↵Randy Morgan
in excel 2011