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
435
ChartText
posted
I need to agregate a chartText to a ChartLayer by code to a CompositeChart, but it doesn´t by designer
Parents
No Data
Reply
  • 28496
    Offline posted

    the syntax should be something like this -- it involves casting, and the type you cast to depends on the ChartType of your ChartLayer... in this case i'm using a ColumnChartAppearance.

    ChartTextAppearance myChartText = new ChartTextAppearance();
    myChartText.Column = myChartText.Row = -2; // wildcard
    myChartText.Visible = true;

    ColumnChartAppearance columnApp = this.ultraChart1.CompositeChart.ChartLayers[0].ChartTypeAppearance as ColumnChartAppearance;
    columnApp.ChartText.Add(myChartText);

Children
No Data