KoolReport's Forum

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

How can I change the colors of a stacked columns chart? #1695

Closed Peter Wendel opened this topic on on Nov 2, 2020 - 2 comments

Peter Wendel commented on Nov 2, 2020

Hello!

How can I change the colors of a stacked d3 column chart?

The docs of d3 suggests using of color:pattern, but I cannot find the right place or spelling for using it with KoolReport ColumnChart::create.

Can you help me on the right track?

KoolReport commented on Nov 3, 2020

Hi Peter,

You do this:

<?php
\koolreport\d3\ColumnChart::create([
    "colorScheme"=>["#aaa","#bbb","#ccc"],
    ...
]);
?>

Basically you provide list of colors to colorScheme property.

Peter Wendel commented on Nov 3, 2020

Works fine!

Thanks for your help!

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

D3