← Back to team overview

dhis2-devs team mailing list archive

Re: Documentation for d2 library

 

Hi Mark,

Sure. Thanks a lot. From the existing apps that are leveraging d2, we have
figured out how to use filters and also to retrieve multiple fields and
their inner objects as well.

But we have an issue. We have our custom apps written in angularJS and want
to use d2 library with it.
As mentioned in the documentation (http://d2.markionium.com), we tried the
following.

If you want to use d2 as just a global variable on the window object you
can include one of the following scripts in your page d2/lib/d2-browser.js
 or d2/lib/d2-browser.min.js

But, we are not able to access d2. Is there something we are missing?
Any help here is appreciated.


*Cheers,*

Archana Chillala
Application Developer
Email archanac@xxxxxxxxxxxxxxxx
Telephone +91 9100960533 <+91+9100960533>
[image: ThoughtWorks]
<http://www.thoughtworks.com/?utm_campaign=archana-chillala-signature&utm_medium=email&utm_source=thoughtworks-email-signature-generator>

On Mon, Jul 4, 2016 at 2:19 PM, Mark Polak <mark@xxxxxxxxx> wrote:

> Hey Archana,
>
> I'm working on after finishing a few things for the 2.24 release. Should
> get you an answer today with some examples. :)
>
> Regards,
>
> Mark
>
> On Mon, Jul 4, 2016 at 9:08 AM, Archana Chillala <
> archanac@xxxxxxxxxxxxxxxx> wrote:
>
>> Hi,
>>
>> Could you please provide any information on the above-mentioned queries.
>>
>>
>>
>> *Cheers,*
>>
>> Archana Chillala
>> Application Developer
>> Email archanac@xxxxxxxxxxxxxxxx
>> Telephone +91 9100960533 <+91+9100960533>
>> [image: ThoughtWorks]
>> <http://www.thoughtworks.com/?utm_campaign=archana-chillala-signature&utm_medium=email&utm_source=thoughtworks-email-signature-generator>
>>
>> On Thu, Jun 30, 2016 at 6:47 PM, Archana Chillala <
>> archanac@xxxxxxxxxxxxxxxx> wrote:
>>
>>> Hi,
>>>
>>> We also came across,* d2-analysis* library (
>>> https://github.com/dhis2/d2-analysis). Is there any documentation about
>>> it and how to use it? Can it be used for all the analytics objects (e.g.
>>> charts, pivot tables, event charts, event reports)
>>>
>>> Regarding the d2 library, could you please let us know its roadmap and
>>> what are the features that will be incorporated.
>>>
>>> Thank you.
>>>
>>>
>>> *Cheers,*
>>>
>>> Archana Chillala
>>> Application Developer
>>> Email archanac@xxxxxxxxxxxxxxxx
>>> Telephone +91 9100960533 <+91+9100960533>
>>> [image: ThoughtWorks]
>>> <http://www.thoughtworks.com/?utm_campaign=archana-chillala-signature&utm_medium=email&utm_source=thoughtworks-email-signature-generator>
>>>
>>> On Thu, Jun 30, 2016 at 5:58 PM, Archana Chillala <
>>> archanac@xxxxxxxxxxxxxxxx> wrote:
>>>
>>>> Also, could you please share some examples on how to use *filters.*
>>>>
>>>>
>>>>
>>>> Archana Chillala
>>>> Application Developer
>>>> Email archanac@xxxxxxxxxxxxxxxx
>>>> Telephone +91 9100960533 <+91+9100960533>
>>>> [image: ThoughtWorks]
>>>> <http://www.thoughtworks.com/?utm_campaign=archana-chillala-signature&utm_medium=email&utm_source=thoughtworks-email-signature-generator>
>>>>
>>>> On Thu, Jun 30, 2016 at 4:49 PM, Archana Chillala <
>>>> archanac@xxxxxxxxxxxxxxxx> wrote:
>>>>
>>>>> Hi Mark,
>>>>>
>>>>> We want to retrieve data in a format specified as shown below.
>>>>>
>>>>>
>>>>> http://localhost:8080/api/dataSets.json?fields=name,id,sections[name,dataElements[id,name,valueType]]
>>>>>
>>>>> which renders this:
>>>>>
>>>>>
>>>>>    - dataSets:
>>>>>    [
>>>>>       -
>>>>>       {
>>>>>          - name: "data set",
>>>>>          - id: "m0rnaeivV6W",
>>>>>          - sections:
>>>>>          [
>>>>>             -
>>>>>             {
>>>>>                - name: "Section1",
>>>>>                - dataElements:
>>>>>                [
>>>>>                   -
>>>>>                   {
>>>>>                      - name: "new data element",
>>>>>                      - id: "JyjMOr3En81",
>>>>>                      - valueType: "NUMBER"
>>>>>                      }
>>>>>                   ]
>>>>>                }
>>>>>             ]
>>>>>          }
>>>>>       ]
>>>>>
>>>>>
>>>>> Is there any d2 alternative to replicate the same? Or do we have to
>>>>> first get all dataElements and then after getting a dataSet filter from
>>>>> dataElements?
>>>>>
>>>>> Thank you.
>>>>>
>>>>>
>>>>> *Cheers,*
>>>>>
>>>>>
>>>>> Archana Chillala
>>>>> Application Developer
>>>>> Email archanac@xxxxxxxxxxxxxxxx
>>>>> Telephone +91 9100960533 <+91+9100960533>
>>>>> [image: ThoughtWorks]
>>>>> <http://www.thoughtworks.com/?utm_campaign=archana-chillala-signature&utm_medium=email&utm_source=thoughtworks-email-signature-generator>
>>>>>
>>>>> On Wed, Jun 29, 2016 at 7:20 PM, Mark Polak <mark@xxxxxxxxx> wrote:
>>>>>
>>>>>> Sorry silly me, forgot to include the link ;)
>>>>>>
>>>>>> https://github.com/dhis2/app-skeleton
>>>>>>
>>>>>> On Wed, Jun 29, 2016 at 3:28 PM, Archana Chillala <
>>>>>> archanac@xxxxxxxxxxxxxxxx> wrote:
>>>>>>
>>>>>>> Hi Mark,
>>>>>>>
>>>>>>> Thank you. Could you share a link to the skeleton app you mentioned.
>>>>>>>
>>>>>>>
>>>>>>> *Cheers,*
>>>>>>>
>>>>>>> Archana Chillala
>>>>>>> Application Developer
>>>>>>> Email archanac@xxxxxxxxxxxxxxxx
>>>>>>> Telephone +91 9100960533 <+91+9100960533>
>>>>>>> [image: ThoughtWorks]
>>>>>>> <http://www.thoughtworks.com/?utm_campaign=archana-chillala-signature&utm_medium=email&utm_source=thoughtworks-email-signature-generator>
>>>>>>>
>>>>>>> On Wed, Jun 29, 2016 at 5:43 PM, Mark Polak <mark@xxxxxxxxx> wrote:
>>>>>>>
>>>>>>>> Hey Archana,
>>>>>>>>
>>>>>>>> If you're still starting to use the tools before that feel free to
>>>>>>>> ask questions on the list or through github issues on the specific
>>>>>>>> repositories and we'll try to help you as best as we can.
>>>>>>>>
>>>>>>>> In the mean time you could take a look at our skeleton app. It has
>>>>>>>> a very basic setup of the libraries Nicolay mentioned and a few comments on
>>>>>>>> what is happening ;)
>>>>>>>>
>>>>>>>> Regards,
>>>>>>>>
>>>>>>>> Mark
>>>>>>>>
>>>>>>>> On Wed, Jun 29, 2016 at 1:22 PM, Archana Chillala <
>>>>>>>> archanac@xxxxxxxxxxxxxxxx> wrote:
>>>>>>>>
>>>>>>>>> Thanks a lot, Lars.
>>>>>>>>>
>>>>>>>>> Archana Chillala
>>>>>>>>> Application Developer
>>>>>>>>> Email archanac@xxxxxxxxxxxxxxxx
>>>>>>>>> Telephone +91 9100960533 <+91+9100960533>
>>>>>>>>> [image: ThoughtWorks]
>>>>>>>>> <http://www.thoughtworks.com/?utm_campaign=archana-chillala-signature&utm_medium=email&utm_source=thoughtworks-email-signature-generator>
>>>>>>>>>
>>>>>>>>> On Wed, Jun 29, 2016 at 4:25 PM, Lars Helge Øverland <
>>>>>>>>> lars@xxxxxxxxx> wrote:
>>>>>>>>>
>>>>>>>>>> Hi Archana,
>>>>>>>>>>
>>>>>>>>>> we definitely plan to improve the docs and provide a consistent
>>>>>>>>>> set of documentation / guides - we just hadn't had the time yet but its
>>>>>>>>>> high on our list after 2.24.
>>>>>>>>>>
>>>>>>>>>> regards,
>>>>>>>>>>
>>>>>>>>>> Lars
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On Wed, Jun 29, 2016 at 12:44 PM, Archana Chillala <
>>>>>>>>>> archanac@xxxxxxxxxxxxxxxx> wrote:
>>>>>>>>>>
>>>>>>>>>>> Thank you, Nicolay.
>>>>>>>>>>>
>>>>>>>>>>> Archana Chillala
>>>>>>>>>>> Application Developer
>>>>>>>>>>> Email archanac@xxxxxxxxxxxxxxxx
>>>>>>>>>>> Telephone +91 9100960533 <+91+9100960533>
>>>>>>>>>>> [image: ThoughtWorks]
>>>>>>>>>>> <http://www.thoughtworks.com/?utm_campaign=archana-chillala-signature&utm_medium=email&utm_source=thoughtworks-email-signature-generator>
>>>>>>>>>>>
>>>>>>>>>>> On Wed, Jun 29, 2016 at 2:43 PM, Nicolay Ramm <nicolay@xxxxxxxxx
>>>>>>>>>>> > wrote:
>>>>>>>>>>>
>>>>>>>>>>>> Hi Archana,
>>>>>>>>>>>>
>>>>>>>>>>>> unfortunately the documentation that currently exists for D2 is
>>>>>>>>>>>> far from extensive. The limited documentation we have can be found here:
>>>>>>>>>>>> http://d2.markionium.com
>>>>>>>>>>>> This is generated from the source code, so you'll find the same
>>>>>>>>>>>> documentation in the code itself.
>>>>>>>>>>>>
>>>>>>>>>>>> The following apps are written using D2, D2-UI, React and RxJS
>>>>>>>>>>>> <https://github.com/Reactive-Extensions/RxJS/>:
>>>>>>>>>>>>
>>>>>>>>>>>>    - Maintenance app <https://github.com/dhis2/maintenance-app>
>>>>>>>>>>>>    - Settings app <https://github.com/dhis2/settings-app>
>>>>>>>>>>>>    - App management app
>>>>>>>>>>>>    <https://github.com/dhis2/app-management-app>
>>>>>>>>>>>>
>>>>>>>>>>>> Hope this helps.
>>>>>>>>>>>>
>>>>>>>>>>>> Best regards,
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> Nicolay Ramm
>>>>>>>>>>>> Front end developer, DHIS 2
>>>>>>>>>>>> University of Oslo
>>>>>>>>>>>> https://www.dhis2.org
>>>>>>>>>>>>
>>>>>>>>>>>> On Wed, Jun 29, 2016 at 10:58 AM, Archana Chillala <
>>>>>>>>>>>> archanac@xxxxxxxxxxxxxxxx> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>> Hi devs,
>>>>>>>>>>>>>
>>>>>>>>>>>>> We are looking at using *d2* library for our custom apps.
>>>>>>>>>>>>> Could you please direct us to any extensive documentation available for the
>>>>>>>>>>>>> same. Also, could you please share with us (repo links for) any apps built
>>>>>>>>>>>>> on react, so we could understand how d2 has been used.
>>>>>>>>>>>>> Thank you.
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> *Cheers,*
>>>>>>>>>>>>>
>>>>>>>>>>>>> Archana Chillala
>>>>>>>>>>>>> Application Developer
>>>>>>>>>>>>> Email archanac@xxxxxxxxxxxxxxxx
>>>>>>>>>>>>> Telephone +91 9100960533 <+91+9100960533>
>>>>>>>>>>>>> [image: ThoughtWorks]
>>>>>>>>>>>>> <http://www.thoughtworks.com/?utm_campaign=archana-chillala-signature&utm_medium=email&utm_source=thoughtworks-email-signature-generator>
>>>>>>>>>>>>>
>>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>>> Mailing list: https://launchpad.net/~dhis2-devs
>>>>>>>>>>>>> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
>>>>>>>>>>>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>>>>>>>>>>>> More help   : https://help.launchpad.net/ListHelp
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> _______________________________________________
>>>>>>>>>>> Mailing list: https://launchpad.net/~dhis2-devs
>>>>>>>>>>> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
>>>>>>>>>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>>>>>>>>>> More help   : https://help.launchpad.net/ListHelp
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> Lars Helge Øverland
>>>>>>>>>> Lead developer, DHIS 2
>>>>>>>>>> University of Oslo
>>>>>>>>>> Skype: larshelgeoverland
>>>>>>>>>> lars@xxxxxxxxx
>>>>>>>>>> http://www.dhis2.org <https://www.dhis2.org/>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>> _______________________________________________
>>>>>>>>> Mailing list: https://launchpad.net/~dhis2-devs
>>>>>>>>> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
>>>>>>>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>>>>>>>> More help   : https://help.launchpad.net/ListHelp
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Regards,
>>>>>>>>
>>>>>>>>
>>>>>>>> Mark Polak
>>>>>>>> Software developer, DHIS 2
>>>>>>>> University of Oslo
>>>>>>>> http://www.dhis2.org <https://www.dhis2.org/>
>>>>>>>> mark@xxxxxxxxx
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Regards,
>>>>>>
>>>>>>
>>>>>> Mark Polak
>>>>>> Software developer, DHIS 2
>>>>>> University of Oslo
>>>>>> http://www.dhis2.org <https://www.dhis2.org/>
>>>>>> mark@xxxxxxxxx
>>>>>>
>>>>>
>>>>>
>>>>
>>>
>>
>
>
> --
> Regards,
>
>
> Mark Polak
> Software developer, DHIS 2
> University of Oslo
> http://www.dhis2.org <https://www.dhis2.org/>
> mark@xxxxxxxxx
>

Follow ups

References