Help to binds a chart to the table, with one series created per unique value in a given column

I Need Data binds a chart to the table, with one series created per unique value in a given column in my case DateTime . 

I can do this with standard VS2019 control chart, but i don't know how do this in ChartControl syncfusion. In Vs2019 I use  Chart.DataBindCrossTable Method described here



CODE that i tried 


Private Sub SfButton2_Click(sender As Object, e As EventArgs) Handles SfButton2.Click

        Me.ChartControl1.Series.Clear()

        DataTable1TableAdapter.Fill(CPSDataSet1.TB_GRAFICO, Date_inicio.Value.Date, Date_final.Value.Date, CInt(TextBox1.Text))

        Dim model As ChartDataBindModel = Nothing

        Dim xAxisLabelModel As ChartDataBindAxisLabelModel = Nothing

        model = New ChartDataBindModel(CPSDataSet1, "TB_GRAFICO")

        'X / Y Names

        model.XName = "DATA"  ' DATE FIELD

        model.YNames = New String() {"Total_horas"}   ' TOTAL OF HOURS

        ‘Create Series

        Dim series As New ChartSeries("PERIODO")

        series.Text = series.Name

        series.SeriesModelImpl = model

        series.Style.TextColor = Color.Black

        series.Style.Font.Bold = True

        Me.ChartControl1.Series.Add(series)

        Me.xAxisLabelModel = New ChartDataBindAxisLabelModel(CPSDataSet1, "TB_GRAFICO")

        ' The columns that has the label values for the corresponding X values.

        Me.ChartControl1.PrimaryXAxis.ValueType = ChartValueType.Category

        Me.xAxisLabelModel.LabelName = "MAQUINA"     ' MACHINE FIELD

        Me.ChartControl1.PrimaryXAxis.LabelsImpl = Me.xAxisLabelModel




1 Reply

GM Gayathri Manickam Syncfusion Team November 8, 2021 12:52 PM UTC

Hi José, 
 
We analyzed your query and currently we do not have support to achieve your requirement “Group series by date “, but we have already logged a feature request on this, and it can be tracked through our feedback portal below.  
 
  
Please cast your vote to make it count. We will prioritize the features every release based on the demands.  
  
If you have any more specification/suggestions to the feature request, you can add it as a comment in the portal.  
 
Thanks, 
Gayathri M. 


Loader.
Up arrow icon