On 6/08/2018 9:47 AM, Rob Atkinson wrote:

I think that much is clear - there needs to be a SWP page to create the right json the D3 library needs....

If I can reflect back Holger's feedback - the open questions are:
1) should we separate out the data provider from the rendering as a SWP page acting as a Service? or as a specialised ui:Element?

Either solution works, but in the spirit of producing responsive web pages, I'd prefer to send a HTML page back first, which then requests the additional data that it needs to populate the widgets.

2) If separated out, is there a jquery/AJAX  pattern or something specific already  in TQ to use as a superclass, a template or a best practice example?

Create a subclass of ui:JSONServices. This makes sure the correct ui:responseType is set for JSON. In the subclass, define the arguments that are going in, and then produce the JSON, e.g. using the SWON namespace.

3) and is there anything like a "D3 visualisation API" for the built in D3 visualisations we should use

While some of our components may use D3 and other libraries, we do not really want to expose these details to 3rd parties, as this would reduce our flexibility in the future.

Holger




On Friday, 3 August 2018 18:41:09 UTC+10, Richard Cyganiak wrote:

    1. Get the data you want to visualise into TopBraid.
    2. Find out what JSON data d3.js needs to display what you wants.
    3. Adapt the SWP code so that it queries your data and produces
    the needed JSON

    Best,
    Richard



    On 3 Aug 2018, at 08:58, Rizwan Bashir <muhammad...@gmail.com
    <javascript:>> wrote:

    I actually want to create sankey diagram for the json objects
    using javascript.

    So far, I have created SWP following the tutorial on
    http://uispin.org/swon.html (section 5 on the page).

    <Auto Generated Inline Image 1.png>
    From the JSON objects, I would like develop sankey diagram using
    d3.js, but don't know how to do that. Sample sankey diagram is below:
    <Auto Generated Inline Image 2.png>




    On Friday, 3 August 2018 08:21:15 UTC+10, Holger Knublauch wrote:



        On 2/08/2018 2:08 PM, Rob Atkinson wrote:
        If I may extend this question - there are two related cases
        here:
        1) custom D3 visualisations
        2) how to control the TQ provided visualisations - for
        example is it possible to pre-configure a set of nodes to
        display in a NeighbourGram, either as instances or a set of
        rules.

        I don't think the JavaScript APIs behind our own
        visualizations are meant to be modified or extended. They are
        all model-driven and I presume these are the only ways to
        customize them too. I need to ask my colleagues who have
        written these components.


        On Thursday, 2 August 2018 13:13:55 UTC+10, Rizwan Bashir
        wrote:

            I have created an SWP page with JSON objects as
            explained in the tutorial http://uispin.org/swon.html
            I would like to use these json objects to be used by d3
            javascript library to develop some visualizations. For
            example, graphically displaying John Kennedy's children.

            What would be the best way to do achieve this?


        This is a bit of an open-ended question. Can you make it more
        specific - what have you tried so far, where are you stuck?
        Shall the data be fetched from a TopBraid server in an Ajax
        call or shall SWP generate the whole page?

        Holger



-- You received this message because you are subscribed to the
        Google Groups "TopBraid Suite Users" group.
        To unsubscribe from this group and stop receiving emails
        from it, send an email to topbraid-user...@googlegroups.com.
        For more options, visit https://groups.google.com/d/optout
        <https://groups.google.com/d/optout>.


-- You received this message because you are subscribed to the
    Google Groups "TopBraid Suite Users" group.
    To unsubscribe from this group and stop receiving emails from it,
    send an email to topbraid-user...@googlegroups.com <javascript:>.
    For more options, visit https://groups.google.com/d/optout
    <https://groups.google.com/d/optout>.
    <Auto Generated Inline Image 1.png><Auto Generated Inline Image
    2.png>

--
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-users+unsubscr...@googlegroups.com <mailto:topbraid-users+unsubscr...@googlegroups.com>.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "TopBraid 
Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to topbraid-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to