#ngx-charts-line-chart remove or hide percentage

5 messages · Page 1 of 1 (latest)

limpid oasis
#

👋Hello can i get some help on this library ngx-charts i need to hide the percentage
HTML:

    <ngx-charts-advanced-pie-chart
      [scheme]="colorScheme"
      [percentageFormatting]="hidePercentageFn"
      [results]="gaugeChart"
      [valueFormatting]="valueFormattingFn"
      [legend]="true"
      [label]="Label"
    >
    </ngx-charts-advanced-pie-chart>

TS:

hidePercentageFn(_value: number): string {
// I wrote this function to hide the percentage value but it showing Nan%
return '-';
}

hybrid yarrow
#

That function is supposed to format the value, but it's expected to return still a number.
I'm not familiar with the library, but you can achieve your goal by css

::ng-deep .item-percent {display: none}
solemn idol
limpid oasis
limpid oasis