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 ?

Parents
  • 53790
    posted

    HI,

    Maybe one possible approach could be if you are using FillScenGraph event with Text primitive. I made small sample with this approach. Please take a look at the attached sample for more details and let me know if you have any questions.

    Regards

Reply Children