Closed tasoskakour closed 6 years ago
Hi,
I've checked on the web, but apparently special characters (like ² and ³) cannot be displayed on Canvas and tags are not allowed in canvas text. I've no simple solution for you... Working with the add-ins "shapesInChart" could be a bypass but not really easy to use for such a request.
Perhaps someone else will have a solution...
François
https://github.com/FVANCOP/ChartNew.js/wiki/900_050_Shapes-Text-Images_In_Chart
idiotic thing maybe but String.fromCharCode(253) wouldnt works 253 is power of 2 and its part of extended ascii table
okey sorry so for power of 2 or 3 can be done with "\u00B2" for 2
and "\u00B3" for 3
for others you can only check out unicode table for bigger power of x
EDIT:
Actual using is for example - xAxisLabel:"power of \u00B2"
@markosko - Nice to know and really interesting ! Thanks a lot. I will update the sample function_x2.html :-)
@others : Following link will give a complete liste of all available power chars. https://en.wikipedia.org/wiki/Unicode_subscripts_and_superscripts
Example : \u207D\u207F\u207A\u2075\u207E <=> (n+5) in "superscript".
Other link with a complete list of all unicode chars... https://unicode-table.com/en/#control-character
Thanks a lot!,
First of all, congratulations to this wonderful work!
I want to show a number raised to a power in the yLabelAxis. For example I want to show 10^3 with the '3' positioned as the power. I see that sup is not supported from canvas.
10<sup>3</sup>
Is it possible to do this?