Page 1 of 1

How to add a text on bar graph in Visual Lansa for Web

Posted: Wed Oct 25, 2023 6:49 am
by afzalauzam
Hi,

Can any one please let me know how to add a text on a Bar Graph in Lansa for Web. Similar to the attached image.
See below sample VL code. Any help is highly appreciated.

Thank you,
Afzal.


* Bar Chart 2D
Define_Com Class(#PRIM_CHRT.BarChart) Name(#BarChart2D) Displayposition(12) Height(448) Left(195) Legendposition(Right) Parent(#COM_OWNER) Tabposition(12) Tabstop(False) Top(150) Width(803)
Define_Com Class(#PRIM_CHRT.BarChartCaption) Name(#Bar2DChartCaption) Parent(#BarChart2D)
Define_Com Class(#PRIM_CHRT.BarChartValue) Name(#Bar2DChartValue1) Description('Total Sales $') Displayposition(1) Parent(#BarChart2D) Themedrawstyle('MediumTitle')
Define_Com Class(#PRIM_CHRT.BarChartValue) Name(#Bar2DChartValue2) Description('Total Cases') Displayposition(2) Parent(#BarChart2D) Themedrawstyle('MediumAccent') Axis(Secondary)

--------------------------------------------------------------------------------------------------------------------

Mthroutine Name(Load2DBarChart) Access(*PRIVATE)

Clr_List Named(#BarChart2D)

Selectlist Named(#SALDSH)

#Bar2DChartCaption := #YYYYMM.AsString + ' ' + #W_MthDay
#Bar2DChartValue1 := #LDMORTO
#Bar2DChartValue2 := #LDMQTY

Add_Entry To_List(#BarChart2D)

#Bar2DChartValue1.CurrentItem.FormatHint Line1('$' + #LDMORTO.AsDisplayString( EditCode_N ))
#Bar2DChartValue2.CurrentItem.FormatHint Line2(#LDMQTY.AsDisplayString( EditCode_N ))

Endselect

Endroutine