Skip to content

lineStyle attribute in series could not set with function #17767

@Virgil-N

Description

@Virgil-N

Version

last

Link to Minimal Reproduction

No response

Steps to Reproduce

option = {
  series: [
    {
      type: 'lines',
      symbol: 'none',
      lineStyle: {
        color: function (params: any) {
          return 'blue';
        }
      },
      data: data
    }
  ]
};

Current Behavior

Error: Type '(params: any) => string' is not assignable to type 'ZRColor | undefined'.

Expected Behavior

With no error.

Environment

- OS:windows 11
- Browser: edge last version
- Framework: react 18

Any additional comments?

Just could not compile.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions