I have created the chart using C# interop. I want to show the exact values on tip of the bar chart. How can I do it? My code is here.
Range chartRange;
Object misValue = System.Reflection.Missing.Value;
ChartObjects xlCharts = (ChartObjects)sheet0.ChartObjects(Type.Missing);
ChartObject myChart = (ChartObject)xlCharts.Add(10, 70, 250, 250);
Chart chartPage = myChart.Chart;
chartRange = sheet0.get_Range("$G$2:$G$12,$AB$2:$AB$12,$AT$2:$AT$12", misValue);
SeriesCollection scl = myChart.Chart.SeriesCollection();
Series xlSeries = scl.NewSeries();
chartPage.SetSourceData(chartRange, misValue);
xlSeries.XValues = sheet0.get_Range("A3:A12");
chartPage.ChartType = XlChartType.xlColumnClustered;
chartPage.Location(XlChartLocation.xlLocationAsNewSheet, "Islamic Summary Chart");
Please help me get the values on tip of the chart.
Thank you.
I don't think you can easily put them on the top on a clustered column chart.
property is the one to look at, but even the
won't work for your type of chart.
One solution for you is to add another series as a XY scatter chart type, hide the points and display the data labels on that series since you can display it above the points. The values can be exactly the same as you have them now.