Stacked chart legend labels

Options
cypherdj
edited February 11, 2022 in Analytics #1
Hi,

I've created a stacked bar chart, which utilises some optional parameters:
status (multi-select),
created before,
created after.

The data is broken up into stacks by an extra column from the data set (casetype), while each stack is split by status.

To select the status, I use a 2nd data set which queries the value/name pairs for each status.

However, the 1st data set only contains the status values, so when I display the legend on the chart, I also get the values (e.g. 928000), rather than the names (e.g. Open), which makes the chart a little hard to read.

Is there a way to map the legend labels to the 2nd data set names based on the matching values?

I guess one might suggest to fetch the names in the 1st data set rather than the values, but this could dramatically increase the size of returned data set, so I would be keen to avoid this if at all possible.

Comments

  • Virgil Dodson
    Virgil Dodson E admin
    edited December 31, 1969 #2
    Options
    Hi cypherdj,

    I see that you are using the row["status"] for the optional grouping and you have only selected the caseTypeStatusCount dataset. Is the status coming from this data set? It might be easier for me to understand if you put a few lines of the data from each data set into a small text file... then use those text files as the data source to put your simple test together.
    Warning No formatter is installed for the format ipb
  • cypherdj
    edited December 31, 1969 #3
    Options
    Hi Virgil,<br />
    <br />
    thanks very much for taking the time to look at my query.<br />
    <br />
    here's the data from the processInstanceStatus data set:<br />
    I NAME DORDER RETIRED <br />
    928,000 Open 0 0 <br />
    928,001 Closed 1 0 <br />
    928,002 Cancelled 2 0 <br />
    <br />
    here's some data from the caseTypeStatusCount data set:<br />
    COUNT CASETYPE DESCRIPTION CASETYPE_C CASETYPE_I STATUS <br />
    2 Showcase Payment - Motor Fire Showcase Payment - Motor Fire 11,603 2,609 928,000 <br />
    2 Showcase Payment - Motor Theft Showcase Payment - Motor Theft 11,603 2,610 928,000 <br />
    1 Dental Claim Dental Claim 11,603 802 928,001 <br />
    1 Disability Claim Disability Claim Type 11,603 3 928,001 <br />
    1 Disability Payment Benefit Disability Payment Benefit 11,603 12 928,000 <br />
    1 Life - New Business Life - New Business 11,603 401 928,000 <br />
    1 Payment - Dental Payment - Dental 11,603 801 928,000 <br />
    1 Payment Benefit Payment Benefit 11,603 11 928,000 <br />
    <br />
    Ideally, I'd like to drop all textual descriptions from the latter, and use other data sets to query the reference data, to optimise performance (by defining those data sets in a reference library).<br />
    <br />
    So in this example, though row["status"] is the optional grouping, the legend should actually display dataSet["processInstanceStatus"].row["NAME"] where row["I"] = row["status"], if that's at all possible,<br />
    <br />
    Furthermore, for the parameterisation, I'd like to use row["DORDER"] in the future to mask the internal values altogether,<br />
    <br />
    Regards,<br />
    Cedric<br />
    <br />
    <blockquote class='ipsBlockquote' data-author="vdodson"><p>Hi cypherdj,<br />
    <br />
    I see that you are using the row["status"] for the optional grouping and you have only selected the caseTypeStatusCount dataset. Is the status coming from this data set? It might be easier for me to understand if you put a few lines of the data from each data set into a small text file... then use those text files as the data source to put your simple test together.</p></blockquote>
  • Virgil Dodson
    Virgil Dodson E admin
    edited December 31, 1969 #4
    Options
    In this case, you should be able to create a Joint Data Set that merges the two queries together based on row["I"] and row["status"]. Then the Name field will be available to use in the chart.
    Warning No formatter is installed for the format ipb
  • cypherdj
    edited December 31, 1969 #5
    Options
    Thanks for the suggestion Virgil, I'll try this in the coming days.

    Regards,
    Cedric
  • cypherdj
    edited December 31, 1969 #6
    Options
    Hi there,

    just a to confirm the suggested solution using a joint data set worked at treat,

    Thanks again,
    Cedric