zam3858
zam3858

Reputation: 173

How can I apply numberSuffix on value only for fusionchart gauge chart

enter image description here

I am using unicode arrow at the value using the chart's numberSuffix. This effects all the numbers on the chart. Is there a way to just apply it only on the value?

I did use annotations before trying this out but scaling messes up with the arrow placement.

Upvotes: 1

Views: 170

Answers (2)

Arnab003
Arnab003

Reputation: 355

I have found another way of implementing the above mentioned feature. A small hack into the code.

Here is the fiddle link.

Although accessing internal objects for implementation is not supported by FusionCharts as it is subjected to change.

    FusionCharts.addEventListener('rendered', function(e) {
        var dataset = e.sender.jsVars.instanceAPI.components.dataset[0],
        labelEle = dataset.graphics.dataLabel && dataset.graphics.dataLabel[0];

        labelEle && (labelEle.attr({
            text: labelEle.attrs.text + " ↓"
        }));
    });

Upvotes: 4

Arnab003
Arnab003

Reputation: 355

You can use annotations for this requirement.

Here is a workaround.

Fiddle

<div id="chart-container">FusionCharts will render here</div>

Upvotes: 3

Related Questions