0

I'm trying to get the order of chart in following order "Green", "Amber" and "Red" but some how the data is plotted in wrong order. Can anyone guide me as to what am I doing wrong. Below is the data of object array and screenshot of the chart

<viz:VizFrame id="idVizFrame" uiConfig="{applicationSet:'fiori'}" selectData="onDataSelected" vizType='stacked_column'>
    <viz:dataset>
        <viz.data:FlattenedDataset data="{path:'burndownJSONModel>/results'}">
            <viz.data:dimensions>
            <viz.data:DimensionDefinition name="Week" value="{burndownJSONModel>C_LDWEEKN_T}"/>
            <viz.data:DimensionDefinition name="Year" value="{burndownJSONModel>A0CALYEAR}"/>
            <viz.data:DimensionDefinition name="RAGStatus" value="{burndownJSONModel>C_ESCDRAG}" dataType="string"/>
            </viz.data:dimensions>
            <viz.data:measures>
            <viz.data:MeasureDefinition name="PartsCount-RAGStatus" value="{burndownJSONModel>A006EI3VDPD4B91I9OEKP6QSZJ}"/>
            </viz.data:measures>
        </viz.data:FlattenedDataset>
    </viz:dataset>
    <viz:feeds>
    <viz.feeds:FeedItem uid="categoryAxis" type="Dimension" values="Year,Week" />
    <viz.feeds:FeedItem uid="valueAxis" type="Measure" values="PartsCount-RAGStatus"/>
    <viz.feeds:FeedItem uid="color" type="Dimension" values="RAGStatus"/>
    </viz:feeds>
</viz:VizFrame>

Data

[{
        "A006EI3VDPD4B91I9OEKP6QSZJ": 17,
        "C_LDWEEKN_T": "W21",
        "C_LDWEEKN": "21",
        "A0CALYEAR": "2018",
        "C_ESCDRAG_T": "Future Demand",
        "C_ESCDRAG": "G",
        "priority": 1
    }, {
        "A006EI3VDPD4B91I9OEKP6QSZJ": 8,
        "C_LDWEEKN_T": "W21",
        "C_LDWEEKN": "21",
        "A0CALYEAR": "2018",
        "C_ESCDRAG_T": "Overdue",
        "C_ESCDRAG": "R",
        "priority": 3
    }, {
        "A006EI3VDPD4B91I9OEKP6QSZJ": 0,
        "C_LDWEEKN_T": "W21",
        "C_LDWEEKN": "21",
        "A0CALYEAR": "2018",
        "C_ESCDRAG_T": "Not Assigned",
        "C_ESCDRAG": "#",
        "priority": 4
    }, {
        "A006EI3VDPD4B91I9OEKP6QSZJ": 17,
        "C_LDWEEKN_T": "W21",
        "C_LDWEEKN": "21",
        "A0CALYEAR": "2019",
        "C_ESCDRAG_T": "Future Demand",
        "C_ESCDRAG": "G",
        "priority": 1
    }, {
        "A006EI3VDPD4B91I9OEKP6QSZJ": 32,
        "C_LDWEEKN_T": "W21",
        "C_LDWEEKN": "21",
        "A0CALYEAR": "2019",
        "C_ESCDRAG_T": "Within 30 Days",
        "C_ESCDRAG": "A",
        "priority": 2
    }, {
        "A006EI3VDPD4B91I9OEKP6QSZJ": 39,
        "C_LDWEEKN_T": "W21",
        "C_LDWEEKN": "21",
        "A0CALYEAR": "2019",
        "C_ESCDRAG_T": "Overdue",
        "C_ESCDRAG": "R",
        "priority": 3
    }, {
        "A006EI3VDPD4B91I9OEKP6QSZJ": 0,
        "C_LDWEEKN_T": "W21",
        "C_LDWEEKN": "21",
        "A0CALYEAR": "2019",
        "C_ESCDRAG_T": "Not Assigned",
        "C_ESCDRAG": "#",
        "priority": 4
    }]

enter image description here

3
  • In this blog blogs.sap.com/2017/07/28/… several “measures/valueAxis” are used. Would it be possible for you to create an example in a tool like plnkr.co ? This might help in analyzing the issue.
    – user6177399
    Aug 19, 2019 at 14:44
  • Hi, thank your for replying I think the problem is the data object array in which if some value is not passed it creates some order and tries to draw it across. example: jsbin.com/givujufihi/1/edit?html,output
    – jasbir
    Aug 20, 2019 at 10:55
  • In the example you can see there us no data for Amber (Within 30 days) for week 21 and year 2018 that's why the order is green and red first time and it follows on for the next bars until there's way to force the order Green, Amber and Red. If you can guide me will be great
    – jasbir
    Aug 20, 2019 at 10:57

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.