cancel
Showing results for 
Search instead for 
Did you mean: 

How to show values beside legend in vizFrame donut chart?

0 Kudos

Hi,

I want to display the count or % displayed chart in legent as well ,beside the legent items like below(attached image), how can i do it? for now i just have below code written for the regular donut chart.

 <viz:VizFrame id="incidentsChart" class="incidentChart" height="1000px" width="461px" visible="{$this.IncidentChart>/visible}" vizType="donut">
                <viz:dataset>
                    <viz.data:FlattenedDataset data="{$this.odata>/IncidentsOverview}">
                        <viz.data:dimensions>
                            <viz.data:DimensionDefinition name="Incident Status"
                                value="{$this.odata>status}" />
                        </viz.data:dimensions>
                        <viz.data:measures>
                            <viz.data:MeasureDefinition name="Number of incidents"
                                value="{$this.odata>count}" />
                        </viz.data:measures>
                    </viz.data:FlattenedDataset>
                </viz:dataset>

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member196805
Contributor
0 Kudos

plotArea.dataPointStyle.rule is the only property that could modify the visible string on legend label. But you need to define the visible string (which allows you to add the numbers behind) and font color of every dimension strings . Please check https://jsbin.com/dokofokefi/edit?html,output