KoolReport's Forum

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

How to move legends from top to side #860

Open iRiyada opened this topic on on May 9, 2019 - 4 comments

iRiyada commented on May 9, 2019

I want the legends to appear on the left side. Now it is coming on top of pie chart

  PieChart::create(array(
        "title"=>"Sale Of Category",
        "dataSource"=>$newStore,
        "columns"=>array(
            "category",
            "cost"=>array(
                "type"=>"number",
                //"prefix"=>"$",
            )
        )
    ));

Is there any property to change the legends to left side. position vertically . instead of top horizontal?

David Winterburn commented on May 9, 2019

Hi,

Please check the legend position option part in Google Pie Chart's docs: https://developers.google.com/chart/interactive/docs/gallery/piechart#configuration-options

Thanks!

iRiyada commented on May 9, 2019

I am using chartjs. both pie chart and polar chart legends needs to be shifted to left and aligned vertically.

David Winterburn commented on May 9, 2019

If you used Chartjs, maybe this docs would be useful: https://www.chartjs.org/docs/latest/configuration/legend.html#position

Let us know if it works for you. Thanks!

iRiyada commented on May 13, 2019

Thank you. As given in the above link setting legend option to left worked.

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
solved

None