Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Whether it is supported to set the Chart AxisTitles? #1553

Closed
Pigflyflyfly opened this issue May 31, 2023 · 1 comment
Closed

Whether it is supported to set the Chart AxisTitles? #1553

Pigflyflyfly opened this issue May 31, 2023 · 1 comment
Labels
duplicate This issue or pull request already exists enhancement New feature or request

Comments

@Pigflyflyfly
Copy link

As shown below
Snipaste_2023-05-31_17-05-55

@Pigflyflyfly Pigflyflyfly changed the title Whether it is supported to to set AxisTitles? Whether it is supported to set the Chart AxisTitles? May 31, 2023
@xuri xuri added the enhancement New feature or request label Jun 1, 2023
@xuri xuri added the in progress Working in progress label Jun 17, 2023
@xuri xuri closed this as completed in f8aa3ad Jun 17, 2023
@xuri xuri removed the in progress Working in progress label Jun 17, 2023
@xuri xuri added the duplicate This issue or pull request already exists label Jun 18, 2023
@xuri
Copy link
Member

xuri commented Jun 18, 2023

Thanks for your issue. This issue duplicated with issues #398 and #801. I have added Title options to set primary axis titles for the AddChart function. Please upgrade to the master branch code, and this feature will be released in the next version. Now you can set primary horizontal and vertical axis titles like this:

err := f.AddChart("Sheet1", "A1", &excelize.Chart{
    // ...
    XAxis: excelize.ChartAxis{
+        Title: []excelize.RichTextRun{
+            {Text: "Primary Horizontal Axis Title"},
+        },
    },
    YAxis: excelize.ChartAxis{
+        Title: []excelize.RichTextRun{
+            {
+                Text: "Primary Vertical Axis Title",
+                Font: &excelize.Font{
+                    Color:  "777777",
+                    Bold:   true,
+                    Italic: true,
+                    Size:   12,
+                },
+            },
        },
    },
})

xuri added a commit to JDavidVR/excelize that referenced this issue Jul 11, 2023
…titles

- Update unit tests and documentation
- Lint issues fixed
jenbonzhang pushed a commit to jenbonzhang/excelize that referenced this issue Oct 22, 2023
…titles

- Update unit tests and documentation
- Lint issues fixed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants