3 Replies Latest reply on Jul 28, 2015 8:15 AM by paic RSS
    callad Explorer

    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

      • Re: How to merge the customer js with the TW widget
        paic Collaborator

        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.

          • Re: How to merge the customer js with the TW widget
            callad Explorer

            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

              • Re: How to merge the customer js with the TW widget
                paic Collaborator

                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.