Datagridview - Sum If (Sum If)

Asked

Viewed 89 times

-1

I am creating a software in VB to analyze the balancing of jobs in factories. The software has a Datagridview as follows: inserir a descrição da imagem aqui

I need to create a stacked bar chart (Stacked Bar) per post (each bar being a post) and distinguished activities on each bar (each stretch of different color corresponds to an activity within that post) as shown below.

inserir a descrição da imagem aqui

I don’t have much experience with the logic involved, but I know that it is possible to make this type of graph quickly using Dynamic Graph in Excel.

I would like to ask for guidelines on how to read the data line by line from Datagridview, group them correctly and in what type of variable, so that I can pass them as arguments correctly to the Chart control in Visual Basic

1 answer

0


There are several ways to do this, however your question does not make very clear some details, for example how your Datagridview is populated. Is it linked to any data source, for example a Datatable or Dataview? Or are you retrieving this information and directly filling in each Datagridviewrow? I believe that your best option is to start from this data and prepare objects containing the filters and queries that interest you, and based on them set the Chart display parameters. Now to tell you exactly how to do this would depend on analyzing directly the code and data you’re using. I don’t know if it helps you, but I found a tutorial on Chart in English: http://www.macoratti.net/10/09/vbn_graf.htm

Browser other questions tagged

You are not signed in. Login or sign up in order to post.