apexcharts / ng-apexcharts

ng-apexcharts is an implementation of apexcharts for angular. It comes with one simple component that enables you to use apexcharts in an angular project.
MIT License
310 stars 78 forks source link

Feature request: "Smooth" line style for radar charts #246

Open JacobStraberg opened 1 year ago

JacobStraberg commented 1 year ago

I have a use case where I need a "smooth" line for a radar plot. Would it be challenging to add to the library?

In chart.js it is possible to add a tension property to the line style: https://www.chartjs.org/docs/latest/charts/line.html#line-styling

I am using chart.js to do what I want but I would prefer to use ng-apexcharts if possible.

dvalley56 commented 1 year ago

In the chartOptions add the following

 stroke: {
      ...
      curve: "smooth",
      ...
    },

You can see the interface file for available options

export interface ApexStroke {
    show?: boolean;
    curve?: "smooth" | "straight" | "stepline" | ("smooth" | "straight" | "stepline")[];
    lineCap?: "butt" | "square" | "round";
    colors?: string[];
    width?: number | number[];
    dashArray?: number | number[];
    fill?: ApexFill;
}