cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

How to merge the customer js with the TW widget

cdai-3
1-Newbie

How to merge the customer js with the TW widget

Hi,

 

I want to create a mix of pie and label chart widget. And now I have a d3.js code to implement it. The interfaces of the d3.js are id and JSON data. The mix of pie and label chart of d3.js uses SVG function and the data formats are different with TW widget.  How can I merge the d3.js with TW widget? Should I create a new mix pie and label chart widget?

I just read the "HelloWorld extension"  but still have a lot of questions. Just like I import the HelloWorld_ExtensionPackage. I find two things (HelloWorld and GoodBye) and one DataShape (SalutationSentEvent) in TW. But I can't find any widget in Mashup. Can you give me some ideas about how it?

 

Looking forward to your reply. Thanks a lot.

 

Calla

3 REPLIES 3
paic
1-Newbie
(To:cdai-3)

Take a look at the D3Tree extension for example (Find it under extensions if you don't have it yet)

We already have a D3 library included so you should be able to build yours fairly quickly.

You can use the HelloWorld Widget extension example to get the Ant build file to help build your extension.

cdai-3
1-Newbie
(To:paic)

Hi Pai,

Thanks for your reply. But I still have a question. I read D3Tree and Tree extensions. And I try to create a new mix pie and label chart widget. First, I merge the labelchart.ide.js with piechart.ide.js. Second, I want to merge the labelchart.runtime.js with piechart.runtime.js. But, I have no idea about merging "this.beforeDestroy, this.handleSelectionUpdate, this.resize and this.runtimeProperties". I can rename some variable in the this.chartDefinition. But I don't know how to process when load the chart.

Can you give me some ideas about how it?

Looking forward to your reply. Thanks a lot.

Calla

paic
1-Newbie
(To:cdai-3)

Hi Calla,

I unfortunately do not have much expertise in this are. I do wonder though if you are merging all these together, couldn't you create a 'mashup template' that represents the combined widgets? Instead of creating a custom widget.

Hopefully someone else can give some input on the actual coding if needed.

Top Tags