Bilbo Baggins
Bilbo Baggins

Reputation: 1199

How to apply logarithmic scale to a Google Materials bar chart's axes

Here's a similar question with no answer:

Logarithmic scale in material google line chart

Here's a working JSFiddle of a materials bar chart:

JSFiddle

When editing the JSFiddle I tried:

hAxis: {logScale: true}

and

hAxis: {scaleType: 'log'}

But neither of these change the x axis scale to a log type.

google.visualization.BarChart seems to have this ability but google.charts.Bar does not. Is there any documentation on why this is?

Upvotes: 2

Views: 476

Answers (1)

WhiteHat
WhiteHat

Reputation: 61222

there are several options which simply don't work with Material charts

including --> {hAxis,vAxis,hAxes.*,vAxes.*}.logScale

see this issue for the entire list...

Tracking Issue for Material Chart Feature Parity #2143


Material chart --> google.charts.Bar -- packages: ['bar']

vs.

Core chart --> google.visualization.ColumnChart -- packages: ['corechart']

or

Core chart --> google.visualization.BarChart -- packages: ['corechart']

Upvotes: 2

Related Questions