How to create a chart about the number of nodes by content type? I am trying to make a chart with 1 column for each content type. Values are the addition of each total.

I have created a view (using the Views module) with two content-type fields. One of them is configured to Count Distinct in aggregation.

In a graph, however, only one column named Type appears, and not a column for each content type.

I am trying both with Views Dataviz and Google Charts Tools.

Any help on this would be appreciated.
Let me try to answer this if I am getting you clearly. There are several contributed modules available for creating charts in Drupal. Refer to the comparison of charting modules for more details. You are not specifying the Drupal version, let me assume a use case for 7. Also know that there are various types of licenses (commercial, open source, ...) for each of the charting libraries, so your choices may be limited by your license needs (each module typically requires at least 1 such charting library as its charting engine). 

The solution I am giving has a lot to do with the Google Charts API implemented via the Google Chart Tools module. The module provides a simple API that allows you to build your graphs on that.The module ships with an example that gives a nice pointer to writing your own custom module.

A simple module to get the content types.

function example_block_info(){
  //lets display this in a block. You can do a page if you like.
  $blocks['example_chart'] = array(
     'info' =&gt; t('Example Line Bar Showing Content Types'),
     'cache' =&gt; DRUPAL_CACHE_PER_ROLE //This is a Drupal default.You can set your own.
   );
 return $blocks;
}

function example_block_view($delta = ''){
    //Create a display for the block.
    switch ($delta) {
      case 'example_chart':
       $block['content'] = example_block_contents()
      break;
    }
  return $block;
}

function example_block_contents(){
  //This is a function specific to the block that lets you prepare the content for the chart.
    //Google Chart Tools integration begins here.
    //First empty the array that is to be passed to draw_chart().
    $settings = array();
    //We then populate the array.
    $settings['chart']['Chart for Nodes'] = array(
      //I am using just one content type. You can loop to get the other node types.
      'header' =&gt; array('My Node'),
      //This is the array to be presented to draw(). 
      'rows' =&gt; array(array(
                example_node_count(),
               )
           ),
      'chartType' =&gt; 'ColumnChart',
      'containerId' =&gt; 'example_chart',
      'options' =&gt; array(
            'forceIFrame' = FALSE,
            'title' =&gt; 'A column chart for nodes',
            'width' =&gt; 800,
            'height' =&gt; 600
        )
    );
    draw_chart($settings);
    //Return the DIV containing the chart.
    return '&lt;div id="example_chart"&gt;&lt;/div&gt;';
}

function example_node_count(){
  //Custom function to count the nodes available.
  //Put to use Entity Field Query.
  $query = new EntityFieldQuery;
  $query
    -&gt;entityCondition('entity_type', 'node')
    -&gt;entityCondition('bundle', 'my_node_type');
    //Count your node type.Introduce a loop to count your other nodes as needed.
    $my_node_type_count = $query-&gt;count()-&gt;execute();
    return $my_node_type_count;
}


This is just a shell of a working module. Get some education of the charts at Google Visualization API docs. Warning: There might be some typos in there. Just trying to give an alternative.