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

Complex chart style: line width #505

Closed
byteman opened this issue Oct 18, 2019 · 5 comments
Closed

Complex chart style: line width #505

byteman opened this issue Oct 18, 2019 · 5 comments
Labels
enhancement New feature or request

Comments

@byteman
Copy link

byteman commented Oct 18, 2019

我再在用go生成一个2D折线图的时候,只有很简单的图表样式可以操作,有什么办法可以生成比较复杂的图表样式吗?或者可以先在excel中设置好样式,然后用go读取出来样式,然后生成在我自己的程序中吗??

@xuri
Copy link
Member

xuri commented Oct 18, 2019

What complex styles do you need, please list them if possible, and I will consider adding support for them. A method for generating a new file based on a template: Create a chart template using Excel Application, open the template file with this lib, and modify the data area referenced by the chart to save it as a new file.

@xuri xuri changed the title 请教一个样式设置问题 Complex chart style Oct 18, 2019
@byteman
Copy link
Author

byteman commented Oct 18, 2019

image
这是我用go库生成的2d折线图,但是看起来线条太粗了,需要在excel中打开重新设置样式
image

这是从新设置样式后的图片

image

怎么才能在代码中来选择样式啊?

@xuri xuri added enhancement New feature or request in progress Working in progress labels Oct 20, 2019
@xuri xuri changed the title Complex chart style Complex chart style: line width Oct 20, 2019
@xuri xuri closed this as completed in 7716968 Oct 20, 2019
@xuri
Copy link
Member

xuri commented Oct 20, 2019

Hi @byteman, I have added support for the set line width of the line chart. Set the width by the specified line parameter in each series:

f.AddChart("Sheet2", "X16", `{
    "type": "line",
    "series": [
    {
        "name": "Sheet1!$A$37",
        "categories": "Sheet1!$B$29:$D$29",
        "values": "Sheet1!$B$37:$D$37",
        "line":
        {
            "width": 0.25
        }
    }]
}`)

@xuri xuri removed the in progress Working in progress label Oct 20, 2019
@byteman
Copy link
Author

byteman commented Oct 22, 2019

i love you so much!!!!

@byteman
Copy link
Author

byteman commented Oct 22, 2019

image

nullfy pushed a commit to nullfy/excelize that referenced this issue Oct 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants