Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

686
Views
¿Hay alguna manera de cambiar el límite de 20 caracteres de la etiqueta de artículo de Ngx-Charts Advanced Pie Chart?

Estoy usando ngx-charts para crear un gráfico en mi aplicación:

pero quiero mostrar información con más de 20 caracteres y la etiqueta del elemento está cortando la información:

ingrese la descripción de la imagen aquí

Estoy usando stackblitz para probar:

https://stackblitz.com/edit/swimlane-pie-chart-advanced-y4sbab?embed=1&file=app/app.component.ts

CSS:

 ::ng-deep .item-value { font-size: 16px !important; margin-top: 0 !important; } ::ng-deep .advanced-pie-legend .legend-items-container .legend-items .legend-item { display: inherit !important; }

HTML:

 <ngx-charts-advanced-pie-chart [view]="view" [scheme]="colorScheme" [results]="single" [gradient]="gradient" > </ngx-charts-advanced-pie-chart>

TS:

 import { Component, NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { NgxChartsModule } from '@swimlane/ngx-charts'; import { single } from './data'; @Component({ selector: 'my-app', templateUrl: './app.component.html', styleUrls: ['./app.component.css'] }) export class AppComponent { single: any[]; view: any[] = [700, 400]; // options showLegend: boolean = true; showLabels: boolean = true; colorScheme = { domain: ['#5AA454', '#A10A28', '#C7B42C', '#AAAAAA'] }; constructor() { Object.assign(this, { single }); } }

módulo:

 import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { FormsModule } from '@angular/forms'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { NgxChartsModule } from '@swimlane/ngx-charts'; import { AppComponent } from './app.component'; @NgModule({ imports: [ BrowserModule, FormsModule, NgxChartsModule, BrowserAnimationsModule ], declarations: [ AppComponent ], bootstrap: [ AppComponent ] }) export class AppModule { }

datos a probar:

 export var single = [ { "name": "this data is limited to 20 characters", "value": 8940000 }, { "name": "Whatever", "value": 5000000 }, { "name": "testing", "value": 7200000 }, { "name": "using charts", "value": 6200000 } ];
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!