Commit Graph

54 Commits

Author SHA1 Message Date
xuri a410b22bdd
Fix the error on getting the range of merged cells on the worksheet which contains one cell merged cell range
- Parse workbook default theme for custom theme color support in the feature
- Variables name typo fix
- Add system foreground and background color as RGB in the IndexedColorMapping list
2022-10-28 00:31:55 +08:00
GaoFei 3ece904b00
This closes #1369, support set, and get font color with theme and tint (#1370) 2022-10-15 00:03:49 +08:00
xuri 3d02726ad4
This closes #320, support custom chart axis font style 2022-10-14 00:48:16 +08:00
xuri 0e657c887b
This closes #1368, fixes number parsing issue, adds support for create a 3D line chart 2022-10-12 00:06:09 +08:00
xuri 53a495563a
This closes #1358, made a refactor with breaking changes, see details:
This made a refactor with breaking changes:

Motivation and Context

When I decided to add set horizontal centered support for this library to resolve #1358, the reason I made this huge breaking change was:

- There are too many exported types for set sheet view, properties, and format properties, although a function using the functional options pattern can be optimized by returning an anonymous function, these types or property set or get function has no binding categorization, so I change these functions like `SetAppProps` to accept a pointer of options structure.
- Users can not easily find out which properties should be in the `SetSheetPrOptions` or `SetSheetFormatPr` categories
- Nested properties cannot proceed modify easily

Introduce 5 new export data types:
`HeaderFooterOptions`, `PageLayoutMarginsOptions`, `PageLayoutOptions`, `SheetPropsOptions`, and `ViewOptions`

Rename 4 exported data types:
- Rename `PivotTableOption` to `PivotTableOptions`
- Rename `FormatHeaderFooter` to `HeaderFooterOptions`
- Rename `FormatSheetProtection` to `SheetProtectionOptions`
- Rename `SparklineOption` to `SparklineOptions`

Remove 54 exported types:
`AutoPageBreaks`, `BaseColWidth`, `BlackAndWhite`, `CodeName`, `CustomHeight`, `Date1904`, `DefaultColWidth`, `DefaultGridColor`, `DefaultRowHeight`, `EnableFormatConditionsCalculation`, `FilterPrivacy`, `FirstPageNumber`, `FitToHeight`, `FitToPage`, `FitToWidth`, `OutlineSummaryBelow`, `PageLayoutOption`, `PageLayoutOptionPtr`, `PageLayoutOrientation`, `PageLayoutPaperSize`, `PageLayoutScale`, `PageMarginBottom`, `PageMarginFooter`, `PageMarginHeader`, `PageMarginLeft`, `PageMarginRight`, `PageMarginsOptions`, `PageMarginsOptionsPtr`, `PageMarginTop`, `Published`, `RightToLeft`, `SheetFormatPrOptions`, `SheetFormatPrOptionsPtr`, `SheetPrOption`, `SheetPrOptionPtr`, `SheetViewOption`, `SheetViewOptionPtr`, `ShowFormulas`, `ShowGridLines`, `ShowRowColHeaders`, `ShowRuler`, `ShowZeros`, `TabColorIndexed`, `TabColorRGB`, `TabColorTheme`, `TabColorTint`, `ThickBottom`, `ThickTop`, `TopLeftCell`, `View`, `WorkbookPrOption`, `WorkbookPrOptionPtr`, `ZeroHeight` and `ZoomScale`

Remove 2 exported constants:
`OrientationPortrait` and `OrientationLandscape`

Change 8 functions:
- Change the `func (f *File) SetPageLayout(sheet string, opts ...PageLayoutOption) error` to `func (f *File) SetPageLayout(sheet string, opts *PageLayoutOptions) error`
- Change the `func (f *File) GetPageLayout(sheet string, opts ...PageLayoutOptionPtr) error` to `func (f *File) GetPageLayout(sheet string) (PageLayoutOptions, error)`
- Change the `func (f *File) SetPageMargins(sheet string, opts ...PageMarginsOptions) error` to `func (f *File) SetPageMargins(sheet string, opts *PageLayoutMarginsOptions) error`
- Change the `func (f *File) GetPageMargins(sheet string, opts ...PageMarginsOptionsPtr) error` to `func (f *File) GetPageMargins(sheet string) (PageLayoutMarginsOptions, error)`
- Change the `func (f *File) SetSheetViewOptions(sheet string, viewIndex int, opts ...SheetViewOption) error` to `func (f *File) SetSheetView(sheet string, viewIndex int, opts *ViewOptions) error`
- Change the `func (f *File) GetSheetViewOptions(sheet string, viewIndex int, opts ...SheetViewOptionPtr) error` to `func (f *File) GetSheetView(sheet string, viewIndex int) (ViewOptions, error)`
- Change the `func (f *File) SetWorkbookPrOptions(opts ...WorkbookPrOption) error` to `func (f *File) SetWorkbookProps(opts *WorkbookPropsOptions) error`
- Change the `func (f *File) GetWorkbookPrOptions(opts ...WorkbookPrOptionPtr) error` to `func (f *File) GetWorkbookProps() (WorkbookPropsOptions, error)`

Introduce new function to instead of existing functions:
- New function `func (f *File) SetSheetProps(sheet string, opts *SheetPropsOptions) error` instead of `func (f *File) SetSheetPrOptions(sheet string, opts ...SheetPrOption) error` and `func (f *File) SetSheetFormatPr(sheet string, opts ...SheetFormatPrOption
2022-09-29 22:04:50 +08:00
xuri cb8bca0e92
This closes #1290 and closes #1328
- Add new smooth field in chart format parameter, support specify if smooth line chart
- Fix decimal number format round issue with build-in number format
2022-08-24 00:00:47 +08:00
xuri c1940c2a1e
This includes new formula functions support, dependencies upgrade, and bug fix
- Fix page setup fields parsing issue
- Go Modules dependencies upgrade
- Ref #65, CONFIDENCE.T and PHI
- Ref #1198, Fix the issue that the chart axis maximum and minimum didn't work when the value is 0
2022-04-11 00:04:00 +08:00
longphee 74b1a998d6
This closes #1172, support set hole size for doughnut (#1173) 2022-03-09 12:34:48 +08:00
xuri f87c39c41d
This closes #1148, resolve limitations when adding VBA project to the workbook
Added two exported functions `SetWorkbookPrOptions` and `GetWorkbookPrOptions` to support setting and getting the code name property of the workbook
Re-order fields of the workbook properties group to improve the compatibility
Go Modules dependencies upgrade
Put workbook related operating in new `workbook.go` source code
Library introduction docs block updated
2022-02-17 00:09:11 +08:00
xuri 2245fccca0
Typo fix, rename exported constants, dependencies modules and copyright update
Rename exported constants `NameSpaceDublinCoreMetadataIntiative` to `NameSpaceDublinCoreMetadataInitiative`
2022-01-09 00:20:42 +08:00
si9ma faa50c3326 feat: add disable option for chart xAxis and yAxis 2021-05-27 13:30:48 +08:00
xuri 1559dd31be
Support specifies that each data marker in the series has a different color 2021-04-10 00:15:39 +08:00
xuri f8f699a172
Go 1.15 and later required, #65 fn: IMABS, IMCOS, IMCOSH, IMCOT, IMCSC, IMCSCH, IMEXP, IMLN and IMLOG10 2021-04-04 15:29:43 +08:00
xuri 2af96c0714
#65 fn: N, PERCENTILE.INC and T
typo fixed
2021-03-30 23:02:22 +08:00
xuri a26675517e
This closes #756, not set the empty string for the cell when SetCellValue with nil 2021-01-08 23:57:13 +08:00
xuri 77978ac68d
This closes #657 and closes #748, AddChart support custom marker symbol and symbol size, fix AddPicture auto fit failure with multi merged cells 2020-12-14 20:56:51 +08:00
xuri 98f1a69903
support ECMA-376 document standard encryption, ref #199 2020-09-02 23:14:19 +08:00
Huy Bui (Kevin) 42b1c81488
Resolve #661 Add Logarithmic scale option support on Y axis (#662)
* Resolve #661 Add Logarithmic scale option support on Y axis

Example usage:
Add the following option into the format string when using AddChart:

"y_axis":{"scaling":{"logbase":"10"}}

* Change type of LogBase from attrValString to attrVarFloat

* Add test case for testing Logarithmic Option in Y axis of charts

* Move field `LogBase` in the format string up one level (remove `Scaling`) as suggested the owner

Test cases are updated accordingly.
2020-07-11 01:07:41 +08:00
xuri 15fd56853f
Update docs and typo fixed 2020-06-22 00:14:56 +08:00
xuri 9e2318cefa
Resolve #470, export Style structs to allow create the style for cells by given JSON or structure 2020-03-10 00:04:23 +08:00
xuri e2bd08c911
Make DeleteChart delete multiple charts located on the same cell 2020-01-21 23:29:56 +08:00
xuri fa7078f06c
Specified combo chart as variadic parameters 2020-01-16 01:05:22 +08:00
xuri 9ddb52eac4 Fix #554, init combo chart support, new chart pie of pie, bar of pie chart support 2020-01-14 00:45:21 +08:00
xuri 09485b3f9f
Improve code coverage unit tests 2019-12-29 16:02:31 +08:00
xuri 8b960ee1e6
Fix #547 and #546, add default overlay element for the chart 2019-12-28 15:05:44 +08:00
xuri 5f3a4bc39f
Fix #538, added setting a major unit and tick label skip support for the chart 2019-12-25 00:00:50 +08:00
xuri 4e4a5b9b3e
Improve compatibility, fix workbook's rels ID calc error 2019-12-23 00:07:40 +08:00
xuri 6abf8bf972
Resolve #501, support set minor grid lines for the chart 2019-10-27 14:16:02 +08:00
xuri 7716968abc
Fix #505, support set line width of the line chart 2019-10-21 00:04:18 +08:00
xuri eb520ae277
Improve compatibility for charts 2019-09-26 22:28:14 +08:00
xuri a34d3b8c86
Compatibility improvement 2019-09-24 21:53:19 +08:00
xuri 9c70d0ac86
Documentation updated, Go 1.10+ required 2019-08-11 00:36:14 +08:00
xuri e77c462d3f
Support to create bubble and 3D bubble chart 2019-06-19 00:01:18 +08:00
xuri 5cf1c05ed4
Add surface 3D, wireframe Surface 3D, contour, and wireframe contour chart support 2019-06-15 20:55:56 +08:00
xuri dc0869fde3
support to create cone, pyramid and cylinder series chart for column and bar types 2019-06-14 00:05:10 +08:00
xuri 821632cf89
Fix #424, refactor merged cells adjuster 2019-06-12 08:10:33 +08:00
xuri 3997dee1f5
Fix #411, change font size to float type 2019-06-07 09:16:55 +08:00
xuri cff16fa811
- Supplemental worksheet struct fields and field order adjustment
- Testing case for set and get doc properties
- Update charts struct XML tags
2019-06-05 22:06:15 +08:00
xuri fabd9d013f
README updated 2019-01-01 13:20:14 +08:00
xuri b04107c4a3
Resolve #311, create 2D/3D area, stacked area, 100% stacked area chart support 2018-12-23 00:07:47 +08:00
tvso 0ef2324f0b fix unknown option in JSON struct tag 2018-10-27 23:19:59 +08:00
xuri 3e004d900b
Comments style changed. 2018-09-14 00:58:48 +08:00
xuri 13a9769cc5
Comments style changed. 2018-09-14 00:44:23 +08:00
xuri 2f146c923c
Comments style changed. 2018-09-14 00:35:47 +08:00
xuri b4a6e61ec3
Fix golint errors under confidence 0.1 2018-09-12 15:47:56 +08:00
Eugene Dzhurinsky 1787c3533b Use format string for chart dimension.
Signed-off-by: Eugene Dzhurinsky <jdevelop@gmail.com>
2018-05-09 08:13:20 -04:00
Ri Xu dcbde4b831
- Add categories or values on reverse order (orientation of the chart) support, and set auto or fixed maximum, minimum of the axis, relate issue #202;
- go test and godoc has been updated
2018-03-29 20:17:07 +08:00
Rohan Allison cc1d3fefc2 Add stacked bar chart 2017-11-24 11:29:35 -06:00
Ri Xu 574a6b20d1
Golang 1.9 compatible, fix issue #111 2017-09-01 12:59:15 +08:00
Ri Xu 6626a26f7b
Simplify code and update unit tests. 2017-08-01 16:35:18 +08:00