cancel
Showing results for 
Search instead for 
Did you mean: 

Design studio sdk data binding

vivek_kumar1
Explorer
0 Kudos

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.

ClaimStatusMeasure

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

Accepted Solutions (1)

Accepted Solutions (1)

vivek_kumar1
Explorer
0 Kudos

I have got the solution for this so closing it.

Feel free to contact me if you require the solution.

Thanks,

vivek

former_member194504
Active Contributor
0 Kudos

Hi vivek kumar,

When you close your own thread, it would be great if you give the answer on the thread itself. So that, it will be useful in future.

Thanks,

Nithyanandam

vivek_kumar1
Explorer
0 Kudos

Thanks for your feedback Nithyanandam.

Soon i am going to publish a blog with details on this and i'll share the link in the comment too. I hope that would be useful for you and others.

Cheers,

Vivek

former_member194504
Active Contributor
0 Kudos

Good to hear that

Answers (1)

Answers (1)

MustafaBensan
Active Contributor
0 Kudos

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.

vivek_kumar1
Explorer
0 Kudos

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