cancel
Showing results for 
Search instead for 
Did you mean: 

change chart type in runtime

Former Member
0 Kudos

Dear experts,

i would like to have a combo box with the chart types when the user change the selection at runtime automatically the chart type change to pie or line or bar or whatever he selected. i am using sap business graphics

could someone guide me how to achieve this target

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Context
+ chartType (BusinessGraphicsType)
+ chartTypeInvalid (boolean)

ChartTypeSelector : DropDownByKey, selectedKey -> @chartType, onSelect -> ChangeChartType (action)

void onActionChangeChartType(...)
{
  wdContext.currentContextElement().setChartTypeInvalid(true);
}

void wdDoModifyView(...)
{
  if ( wdContext.currentContextElement().getChartTypeInvalid() )
  {
    IWDBusinessGraphics gfx = (IWDBusinessGraphics) view.getElement("BusinessGraphics1");
    gfx.setChartType( wdContext.currentContextElement().getChartType() );
    wdContext.currentContextElement().setChartTypeInvalid(false);
  }
}

Armin

Answers (0)