Skip to main content
allenp0001
Known Participant
March 31, 2021
Question

Dynamic Link in a Column chart from a Record type

  • March 31, 2021
  • 6 replies
  • 0 views

I am attempting to make a chart where the user can click on a chart to open another chart for a drill down.  In my example Jack-001 has 2 events associated with it and I would like to click on it and see the details of those events.

{
  a!columnChartField(
    data: 'recordType!{39c31005-7637-4eb1-8a4c-cc1cd5cfa952}sam_failure_analysis1',
    config: a!columnChartConfig(
      primaryGrouping: a!grouping(
        field: 'recordType!{39c31005-7637-4eb1-8a4c-cc1cd5cfa952}sam_failure_analysis1.fields.{equipNo}equipNo',
        alias: "controlNo"
      ),
      measures: a!measure(
        function: "COUNT",
        field: 'recordType!{39c31005-7637-4eb1-8a4c-cc1cd5cfa952}sam_failure_analysis1.fields.{failureMode1}failureMode1',
        alias: "controlNo_count"
      ),
      dataLimit: 100
    ),
    label: "Column Chart",
    series: {
      a!chartSeries(label: "Chart Series", data: {1, 2, 3})
    },
    stacking: "NONE",
    showLegend: true,
    showTooltips: true,
    labelPosition: "ABOVE",
    colorScheme: "CLASSIC",
    height: "MEDIUM",
    xAxisStyle: "STANDARD",
    yAxisStyle: "STANDARD"
  )
}

    6 replies

    mikes0011
    Brainy
    March 31, 2021

    I notice you don't have any links defined yet in the code you posted (either in a!chartSeries or in a!columnChartConfig) - have you tried anything yet?  You'll want a dynamic link somewhere that saves the context of the bar you're clicking into some local variable that can then be used to identify what additional content to show on your interface.  I don't have a handy example off-hand, though if you search within the appian documentation for chart recipes, i'm guessing some of the ones they have set up will demonstrate how to set this up.

    The Expression Guru
    allenp0001
    Known Participant
    April 1, 2021

    Thank you.  I had attempted to modify some of the recipes, see below, but without success.   When I attempt to click on the chart, nothing is saved into the local variable.

    peter.lewis
    Employee
    April 2, 2021

    Can you confirm which version of Appian you're using? Support for links was released in 21.1, so you'll need to be on that version for it to work.