beginner_
beginner_

Reputation: 7622

Google Chart Tools: Superscript in axis tick labels

I have a logarithmic scaled axis and want to label each tick in a custom manner.

hAxis: {        
    ticks: [{v:0.001, f:'10-3'},{v:0.01, f:'0.01'},{v:0.1, f:'0.1'},
            {v:1, f:'1'},{v:10, f:'10'},{v:100, f:'100'},
            {v:1000, f:'10+3'},{v:10000, f:'10+4'},],
    //...
}

However instead of 10-3 and 10+4 I want the -3 and 4 to be superscripts. Is that possible?

Upvotes: 1

Views: 653

Answers (1)

beginner_
beginner_

Reputation: 7622

Unicode superscript characters work.

Eg: 10\u207B\u00B3 for 10^-3 and 10\u2074 for 10^4

See

https://en.wikipedia.org/wiki/Unicode_subscripts_and_superscripts

Upvotes: 2

Related Questions