> > am4core.useTheme(am4themes_animated); > > Create chart instance > var chart = am4" /> > > am4core.useTheme(am4themes_animated); > > Create chart instance > var chart = am4" /> > > am4core.useTheme(am4themes_animated); > > Create chart instance > var chart = am4"/>

Amcharts - Labelbullet is getting cutoff

25 views Asked by At

enter image description here

> `<div id="chartdiv" style="width: 100%; height: 230px;"></div>
> 
> am4core.useTheme(am4themes_animated);
> 
> Create chart instance
> var chart = am4core.create("chartdiv", am4charts.XYChart);
> 
> Add data
> chart.data = [{
>   "category": "Research",
>   "value": 116.875
> }, {
>   "category": "Marketing",
>   "value": 115
> }, {
>   "category": "Distribution",
>   "value": 96.33333
> }];
> 
> var categoryAxis = chart.yAxes.push(new am4charts.CategoryAxis());
> categoryAxis.dataFields.category = "category";
> categoryAxis.renderer.grid.template.location = 0;
> 
> var valueAxis = chart.xAxes.push(new am4charts.ValueAxis());
> valueAxis.max = 120;
> valueAxis.min = 0;
> var series = chart.series.push(new am4charts.ColumnSeries());
> series.dataFields.valueX = "value";
> series.dataFields.categoryY = "category";
> 
> var valueLabel = series.bullets.push(new am4charts.LabelBullet());
> valueLabel.label.text = "{value}";
> valueLabel.label.fontSize = 20;
> valueLabel.label.horizontalCenter = "left";`

Above is my code. Here the labelbullet 116.875 value is getting cutoff as shown in the image but it should not.

Tried Wrap,truncate, setting maxwidh, minwidth and all but nothing worked out

0

There are 0 answers