amcharts / amcharts3-angular2

Official Angular 2 plugin for amCharts V3
99 stars 35 forks source link

How to set up global font-family for whole chart? #75

Open agiUnderground opened 6 years ago

agiUnderground commented 6 years ago

I wanna set for examplefont-family: 'Open Sans', sans-serif; but when i applied it to the .amcharts-stock-div it is doesn't worked.

amcharts commented 6 years ago

New comment from Zendesk by Anthony Piris on ticket 33795. (replying here will automatically notify amCharts support agent)

Hi there,

You can set the fontFamily property in your chart config. In a stock chart, this is set in panelsSettings or can be set per panel. Using the cli example in the repo as a reference:

makeOptions(dataProvider) {
    return {
       "type": "serial",
       "fontFamily":  "'Open Sans', sans-serif",
       // ... etc
    }
}

// stock version: 
makeOptions(dataProvider) {
    return {
       "type": "stock",
       "panelsSettings": {
          "fontFamily": "'Open Sans', sans-serif",
          // ...
       },
       // ... etc
    }
}

This needs to be set per chart.

I hope this helps.

Best,

Anthony Piris amCharts

agiUnderground commented 6 years ago

Awesome. Works. Thank you!

amcharts commented 6 years ago

New comment from Zendesk by Anthony Piris on ticket 33795. (replying here will automatically notify amCharts support agent)

You're very welcome!

Best,

Anthony Piris amCharts

mitou70 commented 5 years ago

Hi Anthony, where can I find the supported font families by amcharts 3.xx ?