Pie Chart Value Item - FormatHint Method

Allows you to overwrite the default hint for a chart item

Member of Pie Chart Value Item (PRIM_CHRT.PieChartValueItem)

Parameters

NameTypeData TypeDescription
Title*Input (Optional)Unicode StringTitle of hint
Line1*Input (Optional)Unicode StringLine one of hint
Line2*Input (Optional)Unicode StringLine two of hint
Line3*Input (Optional)Unicode StringLine three of hint

Details

Allows you to overwrite the default hint for a chart item. This is useful to add contextual details for each item.

Example

The example below shows the hints for each item being formatted after the entries have been added to the list.
Begin_Com Role(*EXTENDS #PRIM_WEB) Theme(#SYS_THEME) Layoutmanager(#Layout1)
 
    Define_Com Class(#PRIM_TBLO) Name(#Layout1)
    Define_Com Class(#PRIM_TBLO.Row) Name(#Layout1Row1) Displayposition(1) Parent(#Layout1)
    Define_Com Class(#PRIM_TBLO.Column) Name(#Layout1Column1) Displayposition(1) Parent(#Layout1)
    Define_Com Class(#PRIM_TBLO.Item) Name(#Layout1Item1) Alignment(TopCenter) Column(#Layout1Column1) Manage(#PieChart1) Parent(#Layout1) Row(#Layout1Row1)
 
    Define_Com Class(#PRIM_CHRT.PieChart) Name(#PieChart1) Displayposition(1) Height(800) Left(0) Parent(#COM_OWNER) Tabposition(1) Tabstop(False) Top(0) Width(1200)
    Define_Com Class(#PRIM_CHRT.PieChartCaption) Name(#PieChartCaption) Parent(#PieChart1)
    Define_Com Class(#PRIM_CHRT.PieChartValue) Name(#PieChartValue) Displayposition(1) Parent(#PieChart1) Themedrawstyle('Back(244,67,54,1)')
 
    Evtroutine Handling(#Com_owner.Initialize)
 
        #PieChartCaption := 'USA'
        #PieChartValue := 9.147
        Add_Entry To_List(#PieChart1)
        #PieChartValue.CurrentItem.ThemeDrawStyle := 'Back(244,67,54,.8)+Border(244,67,54,1)'
        #PieChartValue.CurrentItem.FormatHint Title(#PieChartCaption.CurrentItem.Caption) Line1(('Land mass of &1 million square kilometers').Substitute( #PieChartValue.CurrentItem.Value.AsString ))
 
        #PieChartCaption := 'Australia'
        #PieChartValue := 4.4
        Add_Entry To_List(#PieChart1)
        #PieChartValue.CurrentItem.ThemeDrawStyle := 'Back(0,137,123,.8)+Border(0,137,123,1)'
        #PieChartValue.CurrentItem.FormatHint Title(#PieChartCaption.CurrentItem.Caption) Line1(('Land mass of &1 million square kilometers').Substitute( #PieChartValue.CurrentItem.Value.AsString ))
 
        #PieChartCaption := 'Canada'
        #PieChartValue := 9.9
        Add_Entry To_List(#PieChart1)
        #PieChartValue.CurrentItem.ThemeDrawStyle := 'Back(96,125,139,.8)+Border(96,125,139,1)'
        #PieChartValue.CurrentItem.FormatHint Title(#PieChartCaption.CurrentItem.Caption) Line1(('Land mass of &1 million square kilometers').Substitute( #PieChartValue.CurrentItem.Value.AsString ))
 
        #PieChartCaption := 'UK'
        #PieChartValue := 0.245
        Add_Entry To_List(#PieChart1)
        #PieChartValue.CurrentItem.ThemeDrawStyle := 'Back(255,112,67,.8)+Border(255,112,67,1)'
        #PieChartValue.CurrentItem.FormatHint Title(#PieChartCaption.CurrentItem.Caption) Line1(('Land mass of &1 million square kilometers').Substitute( #PieChartValue.CurrentItem.Value.AsString ))
 
        #PieChartCaption := 'China'
        #PieChartValue := 9.326
        Add_Entry To_List(#PieChart1)
        #PieChartValue.CurrentItem.ThemeDrawStyle := 'Back(56,142,60,.8)+Border(56,142,60,1)'
        #PieChartValue.CurrentItem.FormatHint Title(#PieChartCaption.CurrentItem.Caption) Line1(('Land mass of &1 million square kilometers').Substitute( #PieChartValue.CurrentItem.Value.AsString ))
 
        #PieChartCaption := 'Russia'
        #PieChartValue := 17
        Add_Entry To_List(#PieChart1)
        #PieChartValue.CurrentItem.ThemeDrawStyle := 'Back(253,216,53,.8)+Border(253,216,53,1)'
        #PieChartValue.CurrentItem.FormatHint Title(#PieChartCaption.CurrentItem.Caption) Line1(('Land mass of &1 million square kilometers').Substitute( #PieChartValue.CurrentItem.Value.AsString ))
    Endroutine
 
End_Com

See also

All Component Classes

Technical Reference

LANSA Version 15, April 2020