S
Solution Seeker
Hi,
We have a requirement that we need to show the data from database into the
chart. we are using Office 2003 MS Graph OLE Object.
The issue is that the data from the database assigned in the Chart's
datasheet is not reflected in the chart. This happens in almost 50% of the
charts. If we double-click on the chart, then the values in its datasheet are
reflected correctly. We need to make this refresh as automated one. What we
need to do?
For your information, we are using the Application.Chart.Update() already.
But still it is not solved our problem fully.
Sample Code:
// Sample Code starts
//Creating an instance
chart = shape.OLEFormat.Object as Graph.Chart;
dataSheet = chart.Application.DataSheet;
//Assigning the values to the dataSheet created above
dataSheet.Cells[2, 1] = "10%";
dataSheet.Cells[3, 1] = "20%";
dataSheet.Cells[4, 1] = "30%";
dataSheet.Cells[5, 1] = "40%";
//Updating the chart with the datasheet values
chart.Application.Update();
dataSheet = null;
chart.Application.Quit();
// Sample Code ends
Regards,
Guru
We have a requirement that we need to show the data from database into the
chart. we are using Office 2003 MS Graph OLE Object.
The issue is that the data from the database assigned in the Chart's
datasheet is not reflected in the chart. This happens in almost 50% of the
charts. If we double-click on the chart, then the values in its datasheet are
reflected correctly. We need to make this refresh as automated one. What we
need to do?
For your information, we are using the Application.Chart.Update() already.
But still it is not solved our problem fully.
Sample Code:
// Sample Code starts
//Creating an instance
chart = shape.OLEFormat.Object as Graph.Chart;
dataSheet = chart.Application.DataSheet;
//Assigning the values to the dataSheet created above
dataSheet.Cells[2, 1] = "10%";
dataSheet.Cells[3, 1] = "20%";
dataSheet.Cells[4, 1] = "30%";
dataSheet.Cells[5, 1] = "40%";
//Updating the chart with the datasheet values
chart.Application.Update();
dataSheet = null;
chart.Application.Quit();
// Sample Code ends
Regards,
Guru