on 05-12-2016 2:09 PM
Hi,
As i am new with design studio sdk, finding difficulty in databinding.
I am developing a component for design studio and getting data from universe.
In SDK i want to get the data form universe.
the structure of table is ad below.
Claim | Status | Measure |
---|---|---|
I have claimin sdk and want to compare claim1 with claim so that i can get status and measure corresponding to the matched claim.
if(claim1==claim[i])
{
console.log(status[i]);
console.log(measure[i]);
}
I have go through design studio sdk developer guide and also tried with sample table example but not able to get any help.
currently trying with getter/setter function but not able to get data in component.js.
Need help to complete this requirement.
Thanks in advance.
Regards,
Vivek Kumar
I have got the solution for this so closing it.
Feel free to contact me if you require the solution.
Thanks,
vivek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vivek,
I'd be interested to know the business scenario you are trying to implement with this SDK component. It appears that you are hardcoding a particular data source structure to the component and then implementing business logic based on this structure. This makes the component very specific and prone to breaking when a non-compliant data source is assigned, unless you have appropriate validations in place. It is a better practice to make the component more generic and allow the developer to configure the required business logic via a combination of property settings and script methods instead of hardcoding this in the component itself.
Regards,
Mustafa.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mustafa,
Thanks for your reply.
I am working on a visualization extension in DS SDK. There are 3 dimensions and 1 measure which i have to use in visualization. To get data i am using this code in component.js and this is working for me.
if(data && data.formattedData)
{
for (var i = 0; i < data.formattedData.length; i++)
{
var tuple = data.tuples[i];
for (var j = 0; j < tuple.length-3; j++)
{
var dim1=data.dimensions[j].members[tuple[j]].text;
var dim2=data.dimensions[j+1].members[tuple[j+1]].text;
var measure=data.formattedData[i];
}
}
}
Is there any other way to get dimensions and measure values so that i can implement the business logic?
Thanks,
Vivek
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
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.