Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines
With Google Chart's continuous X axis, pls try this option:
LineChart::create(array(
...
"options" => array(
"explorer" => array(
"actions" => ['dragToZoom', 'rightClickToReset'],
"axis" => 'horizontal',
"keepInBounds" => true,
"maxZoomIn" => 4.0
),
),
));
You can look for Google LineChart's full options documented in this link:
https://developers.google.com/chart/interactive/docs/gallery/linechart#configuration-options
hi thanks for the link, i need one more help, my line chart contains date time in X axis, and number data in Y axis, but horizontal zoom is not working and vertical zoom works
below is my options
"dataSource"=>$this->dataStore('device_data'),
"columns"=>array(
//"date",
"date_time"=>array(
"label"=>"Date Time"
,"type"=>"datetime"
//, "prefix"=>"$"
),
"mark_1"=>array(
"label"=>"Temp",
"type"=>"number"
//, "prefix"=>"$"
)
),
"options" => array(
"explorer" => array(
"actions" => ['dragToZoom', 'rightClickToReset'],
"axis" => 'horizontal',
"keepInBounds" => true,
//"maxZoomIn" => 10,
"maxZoomOut"=>10
),
)
date time column [date_time] => 2022-02-23 18:19:00 .
ok, thanks for your quick response, can we do something like hAxis: {
ticks: [
{v: 1, f: 'Elephant'},
{v: 2, f: 'Horse'},
{v: 3, f: 'Dog'},
{v: 4, f: 'Cat'}
],
title: 'Animal',
},
from this link https://stackoverflow.com/questions/45834351/google-column-charts-x-axis-label-different-from-value numeric value and string label.
Let KoolReport help you to make great reports. It's free & open-source released under MIT license.
Download KoolReport View demo