We are currently performing maintenance on Appian Community. As a result, discussions posts and replies are temporarily unavailable. We appreciate your patience.

142330 - no subject - Hi All,\n\nAm trying to create a stacked

Hi All,

Am trying to create a stacked bar chart that shows SUCCESS and FAILURE cases for each day.For that i have created two datasubsets one for Success and another one for Failure.But when trying to use the values in a!ColumnChartField problem occurs while assigning value to categories parameter as both datasubsets may not be of same length values are displayed in wrong date.
Kindly suggest solution for this case,

Thanks,
Thoufiq.

OriginalPostID-142330


StackedBarChart.txt

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer
    You would want to start by getting a list of all the days (in my example will be the current month):
    local!days: 1+enumerate(day(eomonth(today(),0)))

    Now you'll want to check each datasubset for a value for each day, substituting 0 where you have no value (I would do 2 separate queries for =SUCCESS and <>SUCCESS):
    local!dataPoints: apply(
    fn!displayvalue(
    value: _,
    inArray: local!data.dayMonth,
    replacement: local!data.id,
    default: 0
    ),
    local!days
    )
    This is running through the days variable we made, checking if that value is in your data, and subbing in 0 if there isn't data.
Reply
  • 0
    Certified Lead Developer
    You would want to start by getting a list of all the days (in my example will be the current month):
    local!days: 1+enumerate(day(eomonth(today(),0)))

    Now you'll want to check each datasubset for a value for each day, substituting 0 where you have no value (I would do 2 separate queries for =SUCCESS and <>SUCCESS):
    local!dataPoints: apply(
    fn!displayvalue(
    value: _,
    inArray: local!data.dayMonth,
    replacement: local!data.id,
    default: 0
    ),
    local!days
    )
    This is running through the days variable we made, checking if that value is in your data, and subbing in 0 if there isn't data.
Children
No Data