Hi,
- I want to change position of commas (from 123,456,789 to 12,34,56,789 as Indian) in legends. Does Google ColumnChart provide a function similar to "tooltip"?
If not, can I set a CSS class for legend <text>-s? If I can, can I also get a "ready" client event so I can "getElementsByClassName()" and change formats in javascript?
- In "tooltip" function, can it support html? I tried setting options.isHtml
My view code looks something like this:
use \koolreport\widgets\google\ColumnChart;
ColumnChart::create([
"dataSource" => $this->dataStore("one_type"),
"columns" => [
"Month" => ["type" => "string", "label" => "Month", ],
"Sales Amount" => [
"prefix" => "₹",
"tooltip" => function($row) {
$amt = get_amt_str($row["Sales Amount"]);
return $row["Month"] . "\n <b>Sales Amount: ₹" . $amt</b>;
} # "\n" works, but "<b>" does not work, despite setting "isHtml" below.
],
],
"options" => [
"tooltip" => ["isHtml" => true],
"legend" => ["cssClass" => "column_legend", "position" => "top"],
], # does not appear to work
"clientEvents" => ["ready" => "function() {
$drilldown.next({type: '{$this->params["type"]}', month: 'Dec'});
}",], # "ready" event does not seem to work. "select" event works
"cssClass" => [
"text" => "text_class",
"legend" => "legend_class",
], # does not seem to work
]);
Kindly help...
Thanks,
Laj