8000 BarChart doesn’t display single horizontal bar when value is in the millions · Issue #782 · google/charts · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Jan 9, 2023. It is now read-only.
This repository was archived by the owner on Jan 9, 2023. It is now read-only.
BarChart doesn’t display single horizontal bar when value is in the millions #782
Open
@oopcoders

Description

@oopcoders

The first row doesn't display single bar item. View a working example here https://jsfiddle.net/mharri117/zwycshvm/184/

  google.charts.load('current', {packages: ['corechart']});
  google.charts.setOnLoadCallback(drawChart);

  function drawChart() {
       var data = new google.visualization.DataTable();
        data.addColumn('string');
        data.addColumn('number');
        data.addColumn({ 'type': 'string', 'role': 'style' });
        data.addRows([
          ['name1',3442222,'color: #fcba03'],// This will not show the bar
          //['name2',34422,'color: #fcba03'],// uncomment this line and comment out above line and everything works fine
        ]);

      // Instantiate and draw the chart.
      var chart = new google.visualization.BarChart(document.getElementById('barChart'));
      chart.draw(data, null);
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0