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

How to Set Line Scale in AddShape Function? #262

Closed
coolboy0002001 opened this issue Aug 11, 2018 · 2 comments
Closed

How to Set Line Scale in AddShape Function? #262

coolboy0002001 opened this issue Aug 11, 2018 · 2 comments

Comments

@coolboy0002001
Copy link

My target is to draw lines in xlsx, but I don't know how to set line scale.

qq 20180811191218

xlsx.AddShape("Sheet1", "G6", {"type":"line","scale": 5,"color":{"line":"#4286F4","fill":"#8eb9ff"},"width":10,"height": 10})
not work!

@xuri
Copy link
Member

xuri commented Aug 13, 2018

Thanks for your issue. Add the scale set in the format parameter like this:

{"type":"line", "color":{"line":"#4286F4","fill":"#8eb9ff"},"width":10,"height": 10, "format":{"x_scale":5, "y_scale":5}}

The excelize library doesn't support set line weight currently.

@xuri xuri closed this as completed in 72d84c0 Sep 8, 2021
@xuri
Copy link
Member

xuri commented Sep 8, 2021

I have added support for the set line width of add the shape, please update to the master branch code. Setting line width of adding the shape like this:

{
    "type": "line",
    "color":
    {
        "line": "#4286F4",
        "fill": "#8eb9ff"
    },
    "width": 10,
    "height": 10,
    "format":
    {
        "x_scale": 5,
        "y_scale": 5
    },
    "line":
    {
        "width": 1.5
    }
}

jenbonzhang pushed a commit to jenbonzhang/excelize that referenced this issue Oct 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants