on 09-17-2015 10:06 AM
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.
Hi Serge,
Not sure, whether this is what you're expecting / not? - http://embed.plnkr.co/U0Bc7PJl1tLTGalXsTQi/preview
Testing Steps -
Please correct me, if my understanding was wrong.
Regards,
Sai Vellanki.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Serge,
I used the same model for both chart and table. This is the model that I used -
var dataObject = [ {
"Scenarios": [
{
"Scenario": "Managed System",
"Type" : "Undefined",
"ManagedObject" : "SM7~ABAP"
},
{
"Scenario": "Managed System",
"Type" : "Undefined",
"ManagedObject" : "SD7~ABAP"
},
{
"Scenario": "Managed System",
"Type" : "Undefined",
"ManagedObject" : "FQ7~ABAP"
},
{
"Scenario": "Managed System",
"Type" : "Undefined",
"ManagedObject" : "FP7~ABAP"
},
{
"Scenario": "Managed System",
"Type" : "Undefined",
"ManagedObject" : "NQ7~ABAP"
},
{
"Scenario": "Managed System",
"Type" : "Undefined",
"ManagedObject" : "DQ7~ABAP"
},
{
"Scenario": "Managed System",
"Type" : "Undefined",
"ManagedObject" : "LQ7~ABAP"
},
{
"Scenario": "Managed System",
"Type" : "Undefined",
"ManagedObject" : "RQ7~ABAP"
},
{
"Scenario": "Managed System",
"Type" : "Success",
"ManagedObject" : "HY5~JAVA"
},
{
"Scenario": "Managed System",
"Type" : "Success",
"ManagedObject" : "FT5~JAVA"
},
{
"Scenario": "Managed System",
"Type" : "Success",
"ManagedObject" : "PT5~JAVA"
},
{
"Scenario": "Managed System",
"Type" : "Success",
"ManagedObject" : "ST5~JAVA"
},
{
"Scenario": "Managed System",
"Type" : "Success",
"ManagedObject" : "PT5~JAVA"
}
]
}];
From the above model, I'm fetching the count with type 'Success' and 'Undefined' and binding that count to chart. On click of the bar, I get the type selected and filter the model with that type and bind it to table model.
Sorry, if I understand you wrong, is this what your requirement (or) is it vice-versa ?
Regards,
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.
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.