Skip to content

yAxis.axisTick.lineStyle.color - gradient not supported #13173

@JordanFarrow

Description

@JordanFarrow

Version

4.8.0

Reproduction link

https://jsfiddle.net/Lt1xd3su/

Steps to reproduce

See fiddle.

Create an axisTick with a gradient:

"axisTick": {
      "show": true,
      "inside": true,
      "length": 1020,
      "lineStyle": {
        "color": {
          "type": "linear",
          "x": 0,
          "y": 0,
          "x2": 1,
          "y2": 1,
          "colorStops": [{
            "offset": 0,
            "color": "#f00"
          }, {
            "offset": 0.25,
            "color": "#0f0"
          }, {
            "offset": 1,
            "color": "#00f"
          }],
          "global": true
        }
      }
    }

What is expected?

the tick is colored with a linear gradient

What is actually happening?

color at offset 1 is the only visible color


Does not seem to change if tick is inside or not (no gradient in either case)

Was attempting to use a gradient to get around fact that length of axisTick is not scalable (only accepts Number) (by setting to large value, and then hiding end of line with line color matching to background)

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