KoolReport's Forum

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

Line chart haxis display option #404

Open sneha narnaware opened this topic on on Aug 1, 2018 - 3 comments

sneha narnaware commented on Aug 1, 2018

Hi,

I have develop line chart .....but here need to show only start value of sale done and end value of sale end on haxis ....

like this ... is it possible ..?

David Winterburn commented on Aug 2, 2018

Hi,

Please try this option:

"options" => array(
                    'hAxis' => [
                        'showTextEvery' => $numLabels
                    ]
                ),

where $numLabels is the number of labels you have on hAxis.

Further configuration could be checked here: https://developers.google.com/chart/interactive/docs/gallery/linechart#configuration-options Thanks!

sneha narnaware commented on Aug 2, 2018

Thanks ...

'hAxis' => [
                        'showTextEvery' => $numLabels
                    ]

but its shows all labels ...

'hAxis' => [
                        'showTextEvery' =>1
                    ]

1- shows every label...

'hAxis' => [
                        'showTextEvery' => 2
                    ]

2-alternative ....

but i need only 1st label and last label...

David Winterburn commented on Aug 10, 2018

Hi sneha narnaware,

Please cound the number of labels of your chart (i.e number of your data rows). If your chart's dataSource is a DataStore, the number of your is count($myDataStore->data()).

Then set 'showTextEvery' to be either $numLabels or $numLabels - 1. Please try it and find if it works. Thanks!

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
None yet

None