Need a special offer?Find out if your project fits.
+

But the data labels on top of the charts

Answered
Cedric Gaines asked on April 8, 2020

Maybe I'm missing it, but what option do i configure to have the data display on top of the charts automatically (not just the pop over with the data)?

4 answers

Public
Vera Didenko Vera Didenko Flexmonster April 9, 2020

Hello, Cedric,
 
Thank you for writing to us. 
 
The chart labels can be shown by specifying the showDataLabels chart option, for example:

options: {
chart: {
showDataLabels: true
}
}

Here is a JSFiddle example for illustration: https://jsfiddle.net/flexmonster/bq5ndutf/

We would like to mention that for a pie chart, only the labels that can be shown without overlapping will be displayed. If you desire to show all labels on the pie chart, this can be done by setting the showAllLabels chart option to true.
 
Please let us know if this helps.
 
Kind regards,
Vera

Public
Cedric Gaines April 9, 2020

This is weird, I added that and i still don't get the data labels? (i included my code and what I'm getting on screen)
My Code:
vehicleFlex = new Flexmonster({
container: "vehiclePivotContainer",
componentFolder: "https://cdn.flexmonster.com/",
toolbar: true,
//licenseKey: licenseKey,
height: 800,
beforetoolbarcreated: customizeToolbar,
report: {
dataSource: {
type: "microsoft analysis services",
/* URL to msmdpump.dll */
proxyUrl:cubeURL,
/* Catalog name */
catalog: "ImpactCubeASDb",
/* Cube name */
cube: "VehicleCube"
}
},
options: {
chart: {
showDataLabels: true
},
grid: {
type: "classic",
showTotals: false
}
}
});

Attachments:
nodatalabel.PNG

Public
Vera Didenko Vera Didenko Flexmonster April 9, 2020

Hello, Cedric, 
 
Thank you for your reply and for providing your report configuration.
 
We have noticed that the options object is specified outside of the report object in your configuration.
Please kindly note that the options object is part of the report object, hence, please try specifying it the following way:

vehicleFlex = new Flexmonster({
...
report: {
dataSource: {...},
options: {
chart: {
showDataLabels: true
},
grid: {
type: "classic",
showTotals: false
}
}
}

...
});

For more information about the report object's structure, please see the following guide.
 
Please let us know if this helps.
 
Waiting for your response.
 
Kind regards,
Vera

Public
Cedric Gaines April 9, 2020

Totally missed that.
That resolved the issue,
Thanks a million

Please login or Register to Submit Answer