0

I'm using react-native-charts-wrapper for creating a chart and I was wondering if there is a way to change the x-axis label style for just one bar? I have a whole week in the chart and I want to change the color of the current day. So if today is Monday I just want the M to be a different color. I don't want to change the color of the bar, just the letter under it.

enter image description here

These are settings for xAxis:

   xAxis: {
        drawAxisLine: true,
        drawGridLines: false,
        position: 'BOTTOM',
        labelCount: 7,
        valueFormatter: ['M', 'T', 'W', 'T', 'F', 'S', 'S'],
        textColor: formatedColor,
        axisMinimum: -1,
        axisMaximum: 7,
        avoidFirstLastClipping: true,
      },

I checked the documentation and properties but couldn't find anything.

sofronijev
  • 47
  • 1
  • 9

1 Answers1

0

I think I know core:google.charts.load('current'); ChartType: ColumnChart; Don't use the bar

google.charts.load('current');   
      google.charts.setOnLoadCallback(drawVisualization);

      function drawVisualization() {
        var wrapper = new google.visualization.ChartWrapper({
          chartType: 'ColumnChart',
          dataTable: [
             ['Element', 'Density', { role: 'style' }],
             ['Copper', 8.94, '#b87333'],          
             ['Silver', 10.49, 'silver'],           
             ['Gold', 19.30, 'gold'],

           ['Platinum', 21.45, 'color: #e5e4e2' ],
                      ],
          options: {'title': 'Countries'},
          containerId: 'columnchart_values'
        });
        wrapper.draw();
      }
aiden
  • 1