Skip to Content
avatar image
Former Member

Data model for charts and tables

Hi,

I have the following model for rendering an horizontal stacked bar chart.

{
    "Scenarios": [
    {
        "Scenario": "Managed System",
        "Type"    : "Undefined",
        "ManagedObjects"  : 25
    },
    {
        "Scenario": "Managed System",
        "Type"    : "Success",
        "ManagedObjects"  : 10
    }
    ]
}

Here for the scenario Managed System I will have one bar with two values: 25 and 10.

And on the same screen I have to display details of Managed Objects at the same time : 25 lines of Managed Object with Type Undefined and 10 lines with Type Success.

So I would need this kind of model to match the table:

{
    "Scenarios": [
    {
        "Scenario": "Managed System",
        "Type"    : "Undefined",
        "ManagedObject"  : "FA7~ABAP"
    },
    {
        "Scenario": "Managed System",
        "Type"    : "Undefined",
        "ManagedObject"  : "SD7~ABAP"
    },
    {
        "Scenario": "Managed System",
        "Type"    : "Undefined",
        "ManagedObject"  : "FQ7~ABAP"
    },
    ... 
    {
        "Scenario": "Managed System",
        "Type"    : "Success",
        "ManagedObject"  : "HY5~JAVA"
    },
    {
        "Scenario": "Managed System",
        "Type"    : "Success",
        "ManagedObject"  : "FT5~JAVA"
    }
    ...
    ]
}

There is a Filter bar common to the chart and the table.

How could I managed to have the same model working for the graph and the table using the filtering capabilities?

Thanks,

Serge.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Sep 18, 2015 at 05:45 PM

    Hi Serge,

    Not sure, whether this is what you're expecting / not? - http://embed.plnkr.co/U0Bc7PJl1tLTGalXsTQi/preview

    Testing Steps -

    • Stacked Bar chart is plotted with Scenario/Type dimensions. Click on either of the bar Success/Undefined.
    • You can see the table items icon bar getting expanded with filtered details displayed on table. And at the same time bar icon bar gets minimized.
    • If you want to change the selection, click on 'Reset Data' button which is placed at table header bar, where the chart appears again.
    • You can click on any bar again, so the corresponding details will be displayed on table.

    Please correct me, if my understanding was wrong.

    Regards,

    Sai Vellanki.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Sai Vellanki

      Hi Sai,

      Yes I saw that you created a new json model for the graph.

      But I'd like to avoid this extra model and then post-processing to compute the graph's aggregation (count).

      I'd expect the graph to do it on its own with some extra configuration.

      Then I'll bind only one model for both graph and list.

      Is it possible?

      Regards,

      Serge.