title: C# how to make a live bar chart (Livecharts library)
body: <p>I am transferring the numerical data to the graph in a Cartesian graph. However, I have a problem when extracting the data names from the database. Names do not appear. I want my data to appear like a pie chart next to the Cartesian graph. I want to match the data in the &quot;GelirAdi&quot; column to the chart. In summary &quot;GelirAdi&quot; column will be name, &quot;GelirMiktari&quot; will be numeric value in cartesien graph but how can I do that?</p>
  <p><a href="https://i.stack.imgur.com/usJSJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/usJSJ.png" alt="enter image description here" /></a></p>
  <pre><code>private void btn_gider_bilgi_getir_Click(object sender, EventArgs e)
  {
      string veritabaniyolu = &quot;Data source=veritabani.db&quot;;
      bunifuDataGridView1.DataSource = null;
  
      SQLiteConnection baglanti = new SQLiteConnection(veritabaniyolu);
      baglanti.Open();
      string sql_tarih_sorgula = &quot;SELECT * FROM Gelirler&quot;;
      SQLiteDataAdapter da = new SQLiteDataAdapter(sql_tarih_sorgula, baglanti);
      DataTable dt = new DataTable();
      da.Fill(dt);
      bunifuDataGridView1.DataSource = dt;
      baglanti.Close();
  
      ColumnSeries series2 = new ColumnSeries()
      {
          DataLabels = true,
          Values = new ChartValues&lt;int&gt;(),
          LabelPoint = point =&gt; point.Y.ToString()
      };
      Axis axisX = new Axis() {
          Separator = new Separator() { Step = 1, IsEnabled = false },
          Labels=new List&lt;string&gt;()
      };
  
      Axis axisY = new Axis()
      {
          LabelFormatter=y=&gt;y.ToString(),
          Separator=new Separator()
  
      };
      cartesianChart1.Series.Add(series2);
      cartesianChart1.AxisX.Add(axisX);
      cartesianChart1.AxisY.Add(axisY);
      foreach (DataGridViewRow item in bunifuDataGridView1.Rows) {
  
          int a = Convert.ToInt32(item.Cells[&quot;GelirMiktari&quot;].Value);
          series2.Values.Add(a);
          axisX.Labels.Add(item.Cells[&quot;GelirAdi&quot;].Value.ToString());
      }
  }
  </code></pre>