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 ?
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
Here is the sample
Thanks a lot georgi it works perfectly !
However, the text I want to set will be defined in the main program.
Can you tell me how I can put these numbers in the fillscenegraph ?
Thanks
hi,
I`m not sure that I understand your scenario anad final goals. Could you please give me more details.
Thanks and Regards
Hi Georgi,
Thanks a lot the sample is working forget my last question.
Hello eltorfuerte,
Thanks for these details, but could you please tell me where is stored the connection between each bar and corresponding day. Are you able to upload small sample with your scenario. I`ll be glad ot research your sample and midified with desired behavior.
Ok ,each bar corresponds to a certain numbers of days, for example: Bar 1 shows 48 % made in 5 days. I want to show number 5 at the top of the bar as you did it for "Hello".
However, the number of day is calculated on the fly when my macro is running how I can send this value to fillscenegraph method ?