Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1300
How to write a comment at the top of a bar in a composite chart ?
posted

Hi ,

I want to write a label at the top of each of my bar in a composite chart I tried something like this:

            ChartLayerAppearance columnLayer = new ChartLayerAppearance();
            columnLayer.AxisX = columnXAxis;
            columnLayer.AxisY = YAxis2;
            columnLayer.ChartArea = area;
            columnLayer.ChartType = ChartType.ColumnChart;
            columnLayer.Series.Add(VolumeNum);
            columnLayer.Series.Add(VolumeNumDV);
            columnLayer.SwapRowsAndColumns = true;
            
            ColumnChartAppearance appearance = new ColumnChartAppearance();
            appearance.ColumnSpacing = 0;
            appearance.SeriesSpacing = 0;

            ChartTextAppearance ColumnTextApp = new ChartTextAppearance();
            ColumnTextApp.Visible = true;
            ColumnTextApp.Row = 0;
            ColumnTextApp.Column = 1;
            ColumnTextApp.ItemFormatString = "Hello";
            appearance.ChartText.Add(ColumnTextApp);
            toplot.CompositeChart.ChartLayers.Add(columnLayer);

But this does not work , the hello message is not visible.

Any idea ?