amcharts3 icon indicating copy to clipboard operation
amcharts3 copied to clipboard

unit attribute for CategoryAxis

Open EmaileriMikko opened this issue 7 years ago • 3 comments

ValueAxis supports unit for its values. Could we get the same for CategoryAxis without the use of a label function?

EmaileriMikko avatar Apr 18 '17 11:04 EmaileriMikko

I'm afraid we don't have any immediate plans on adding unit property to category axis.

The labelFunction usage is pretty straightforward, though:

  "categoryAxis": {
    "labelFunction": function(label) {
      return label + " h";
    }
  }

I hope you find this useful.

martynasma avatar Apr 18 '17 13:04 martynasma

@martynasma Thanks for your reply. The problem with the labelFunction is that storing the config object in JSON format in a database for example is problematic. However, this will do for now with some weird manipulations on the server side.

EmaileriMikko avatar Apr 19 '17 05:04 EmaileriMikko

Gotcha. This makes sense.

I'm adding this to TODO list. If it gets implemented, we'll let you know.

martynasma avatar May 03 '17 09:05 martynasma