KoolReport's Forum

Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines

Label value #3429

Open Ashish opened this topic on on Mar 27 - 5 comments

Ashish commented on Mar 27

How can i change label from percentage to value - code - PieChart::create(array(

"title" => "Diversification Analysis",
"dataStore" => $this->dataStore('myTestDataStore'),
"columns" => array(
    "investortype" => array(
        "label" => "Investor Type"
    ),
    "count" => array(
        "label" => "Total",
        "type" => "number"
    )
),
"label" => array(
    "show" => true, // Whether to show the label
    "use" => "value", // i want to display value insted of percentage but it wont work
)

));

Sebastian Morales commented on Mar 28

Would you mind letting us know which chart package you use, is it Google, ApexCharts, Chartjs, D3 or another one?

Ashish commented on Mar 28

I am using Google package

Sebastian Morales commented on Mar 28

Pls try this:

PieChart::create(array(
    ...
    "options" => array(
        "pieSliceText" => "value", // Add this option
    )
)); 

A Google chart's option is often applicable inside the "options" array like the above one:

https://developers.google.com/chart/interactive/docs/gallery/piechart?csw=1#configuration-options

Ashish commented on Mar 28

This is working fine can you tell me how to apply leader lines ?

PieChart::create(array(

"title"=>"Diversification Analysis",
"dataStore" => $this->dataStore('myTestDataStore'),
"columns"=>array(
        "investortype" => array(
            "label" => "Investor Type"
        ),
        "count" => array(
            "label" => "Total",
            "type" => "number"
        )
    ),
    "options" => array(
    "pieSliceText" => "value", // Add this option
)

));

Sebastian Morales commented on Mar 31

I'm confused what you meant by leader lines. Would you pls describe in details or with screenshots about leader lines?

Build Your Excellent Data Report

Let KoolReport help you to make great reports. It's free & open-source released under MIT license.

Download KoolReport View demo
None yet

None