amcharts / export

Apache License 2.0
56 stars 33 forks source link

Export using black theme causes hard to read text #82

Closed Raggaer closed 6 years ago

Raggaer commented 6 years ago

Currently I am using the black theme on my chart (everything works fine)

firefox_2018-08-05_17-38-53

However when I export the chart I get some white parts I cant really read...

amcharts

Below its my chart script:

var chart = AmCharts.makeChart("chart", {
  "hideCredits":true,
  "type": "serial",
  "theme": "black",
  "marginRight": 80,
  "autoMarginOffset": 20,
  "marginTop": 7,
  "dataProvider": data,
  "valueAxes": [{
      "axisAlpha": 0.2,
      "dashLength": 1,
      "position": "left"
  }],
  "mouseWheelZoomEnabled": false,
  "graphs": [{
      "id": "g1",
      "useNegativeColorIfDown": true,
      "balloonText": bt,
      "bullet": "round",
      "bulletBorderAlpha": 1,
      "bulletBorderColor": "#FFFFFF",
      "hideBulletsCount": 50,
      "lineThickness": 2,
      "lineColor": "#B99C74",
      "fillAlphas": 0.1,
      "fillColorsField": "lineColor",
      "negativeLineColor": "#e39943",
      "valueField": "Median"
  }],
  "chartScrollbar": {
    "scrollbarHeight": 20,
    "backgroundAlpha": 0.1,
    "backgroundColor": "#ccc",
    "selectedBackgroundColor": "#e39943",
    "selectedBackgroundAlpha": 1
  },
  "chartCursor": {
    "valueLineEnabled": false,
    "valueLineBalloonEnabled": false
  },
  "dataDateFormat": "YYYY-MM-DDTHH:NN:SSZ",
  "categoryField": "CreatedAt",
  "categoryAxis": {
      "parseDates": true,
      "axisColor": "#ffffff",
      "dashLength": 5,
      "minorGridEnabled": false,
      "minPeriod": "5mm"
  },
  "export": {
      "enabled": true
  }
});

I am not sure if its a missing configuration keyword or the black theme?

Thanks

martynasma commented 6 years ago

Export exports images with white background by default.

You can specify different color using backgroundColor setting. E.g.:

"export": {
    "enabled": true,
    "backgroundColor": "#000"
}
Raggaer commented 6 years ago

@martynasma Thank you