KoolReport's Forum

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

Globally setting for decimal point and thousands seperator? #1699

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

Peter Wendel commented on Nov 5, 2020

Hello again!

Is it possible to set this settings globally to a chart oder table without customizing it in every column of it? That would be nice for us Germans... ;-)

David Winterburn commented on Nov 6, 2020

Hi Peter,

Would you please show one or two examples for us to better understand your idea? Thanks!

Peter Wendel commented on Nov 6, 2020

Hi! Okay.

In Germany , think you know this, we use decimal point and thousands separator vice versa the english notation.

So when I create a column chart with database data it will look like this:

ColumnChart::create([
'dataSource' => $data,
'columns' => [
'category',
'VO-Kosten' => [
'label' => 'Gesamt-VO ',
'type' => 'number',
'suffix' => ' €',
"decimals" => 2,
"decPoint" => ",",
"thousandSep" => ".",
],
'Erreichte Ziele' => [
'label' => 'Abzug Ziele (bereinigt)',
'type' => 'number',
'suffix' => ' €',
"decimals" => 2,
"decPoint" => ",",
"thousandSep" => ".",

],
'Alle Ziele erreicht' => [
'label' => 'Max. möglicher Abzug (bereinigt)',
'type' => 'number',
'suffix' => ' €',
"decimals" => 2,
"decPoint" => ",",
"thousandSep" => ".",
],
],
'stacked' => true,
'colorScheme' => ['#475C71', '#714771', '#EE614F']
]);

I reformat the settings for every single value and it would be comfortable to do it globally for this chart:

ColumnChart::create([
'dataSource' => $data,
'columns' => [
'category',
'VO-Kosten' => [
'label' => 'Gesamt-VO ',
'type' => 'number',
],
'Erreichte Ziele' => [
'label' => 'Abzug Ziele (bereinigt)',
'type' => 'number',
],
'Alle Ziele erreicht' => [
'label' => 'Max. möglicher Abzug (bereinigt)',
'type' => 'number',
],
],
'stacked' => true,
'colorScheme' => ['#475C71', '#714771', '#EE614F'],
'suffix' => ' €',
"decimals" => 2,
"decPoint" => ",",
"thousandSep" => ".",
]);

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
help needed
suggestion

None