VChart icon indicating copy to clipboard operation
VChart copied to clipboard

[Bug] Radar chart render error when set the 'line.style.curveType' to be `monotone`

Open simaQ opened this issue 1 year ago • 1 comments

Version

lastest

Link to Minimal Reproduction

none

Steps to Reproduce

const spec = {
  type: 'radar',
  data: [
    {
      id: 'radarData',
      values: [
        {
          key: 'Strength',
          value: 5
        },
        {
          key: 'Speed',
          value: 5
        },
        {
          key: 'Shooting',
          value: 3
        },
        {
          key: 'Endurance',
          value: 5
        },
        {
          key: 'Precision',
          value: 5
        },
        {
          key: 'Growth',
          value: 5
        }
      ]
    }
  ],
  categoryField: 'key',
  valueField: 'value',
  point: {
    visible: false // disable point
  },
  area: {
    visible: true, // display area
    state: {
      // The style in the hover state of the area
      hover: {
        fillOpacity: 0.5
      }
    },
    style: {
      curveType: 'monotone'
    }
  },
  line: {
    style: {
      curveType: 'monotone'
    }
  },
  axes: [
    {
      orient: 'radius', // radius axis
      zIndex: 100,
      min: 0,
      max: 8,
      domainLine: {
        visible: false
      },
      label: {
        visible: true,
        space: 0,
        style: {
          textAlign: 'center',
          stroke: '#fff',
          lineWidth: 4
        }
      },
      grid: {
        smooth: false,
        style: {
          lineDash: [0]
        }
      }
    },
    {
      orient: 'angle', // angle axis
      zIndex: 50,
      tick: {
        visible: false
      },
      domainLine: {
        visible: false
      },
      label: {
        space: 20
      },
      grid: {
        style: {
          lineDash: [0]
        }
      }
    }
  ]
};

const vchart = new VChart(spec, { dom: CONTAINER_ID });
vchart.renderSync();

// Just for the convenience of console debugging, DO NOT COPY!
window['vchart'] = vchart;

Current Behavior

image

Expected Behavior

fix it

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

simaQ avatar Apr 29 '24 04:04 simaQ

https://github.com/VisActor/VRender/issues/1181

xile611 avatar May 07 '24 06:05 xile611

use catmullRomClosed in radar chart

xile611 avatar Aug 06 '24 10:08 xile611