← Back to team overview

dhis2-devs team mailing list archive

Re: High charts developer guide.

 

Hi Edoardo,

Do we have some documentation across this chartPlugin.load function. We are
using 2.26 and we are planning to upgrade as well to 27.

Regards,
Sultan Ahamar.

On Thu, Sep 14, 2017 at 1:09 PM, Edoardo Sabadelli <edoardo@xxxxxxxxx>
wrote:

> It also depends on which version of DHIS2 you are running.
>
> The chartPugin.load() syntax is available for all 4 apps from 2.27.
>
> Before that, Data Visualizer and Pivot Table plugin should work with
> chartPlugin.load() (at least from 2.25), while Event Visualizer and
> Event Reports need the old syntax.
>
> I'm relative new to DHIS2, started working on it since 2.27, so for
> older versions someone else should help :)
>
> Regards,
>
> On Thu, Sep 14, 2017 at 9:17 AM, Sultanahamar Mohammad
> <sultanm@xxxxxxxxxxxxxxxx> wrote:
> > Hi Edoardo,
> >
> > Below is the kind of code that we used for EXTJS based plugins. We want
> to
> > understand the same for Highcharts based plugins.
> >
> > DHIS.getChart({
> >  url: dhisUrl, el: chart.id, id: chart.id, type: chart.type,
> > relativePeriodDate:
> > PeriodGeneratorService.getNextPeriod(chart.relativePeriods,
> selectedPeriod,
> > dateFormat),
> >  width: width, height: height, dashboard: true
> > });
> >
> > Regards,
> > Sultan Ahamar.
> >
> > On Thu, Sep 14, 2017 at 12:31 PM, Edoardo Sabadelli <edoardo@xxxxxxxxx>
> > wrote:
> >>
> >> I understand.
> >>
> >> One way would be to save a new favorite with the desired relative
> >> period date and load that favorite in the script.
> >> If you want to pass the chart configuration directly in the script, it
> >> would be helpful if you can post the code you are using.
> >>
> >> I'll fix the example in the documentation, as it has a couple of
> >> syntax errors and missing parts.
> >>
> >> Regards,
> >>
> >> On Thu, Sep 14, 2017 at 8:51 AM, Sultanahamar Mohammad
> >> <sultanm@xxxxxxxxxxxxxxxx> wrote:
> >> > Hi Edoardo,
> >> >
> >> > This example talks about loading existing charts, but what we want is
> to
> >> > load them but use a different relative time period.
> >> >
> >> > For example if a chart has time period last 6 months then, it would
> load
> >> > last six months of data  (aug, jul, jun, may, apr, feb 2017)
> >> > but what we want is to set the relative time period different like I
> >> > want 6
> >> > months of data starting june of 2016 it will be (jan, feb mar apr may
> >> > jun)
> >> >
> >> > Thanks,
> >> > Sultan Ahamar.
> >> >
> >> > On Thu, Sep 14, 2017 at 12:14 PM, Edoardo Sabadelli <
> edoardo@xxxxxxxxx>
> >> > wrote:
> >> >>
> >> >> Hello!
> >> >>
> >> >> It seems that the example in the documentation
> >> >>
> >> >>
> >> >> (https://docs.dhis2.org/master/en/developer/html/
> webapi_plugins.html#webapi_chart_plugin)
> >> >> is incomplete.
> >> >>
> >> >> The instruction for actually loading the favorite/custom chart config
> >> >> is missing:
> >> >>
> >> >> This is the command:
> >> >>
> >> >> chartPlugin.load(r1, r2);
> >> >>
> >> >> Have a look at
> >> >> https://github.com/dhis2/charts-app/blob/master/plugin.html
> >> >> for a working example.
> >> >>
> >> >> Hope this helps.
> >> >>
> >> >> Regards,
> >> >>
> >> >> On Thu, Sep 14, 2017 at 7:30 AM, Sultanahamar Mohammad
> >> >> <sultanm@xxxxxxxxxxxxxxxx> wrote:
> >> >> > Hi Team,
> >> >> >
> >> >> > We want to use high charts plugins in our DHIS custom apps. We have
> >> >> > been
> >> >> > through developer guide and found plugins part where there are 2
> >> >> > examples
> >> >> > for each but they do not fit our requirement. What we are looking
> >> >> > towards is
> >> >> > to create charts/tables in all 4 visualization apps and show them
> in
> >> >> > custom
> >> >> > app but with a different relative period date. Could you please let
> >> >> > us
> >> >> > know
> >> >> > on how to proceed
> >> >> >
> >> >> > Thanks and Regards,
> >> >> > Sultan Ahamar.
> >> >> >
> >> >> > _______________________________________________
> >> >> > 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
> >> >> >
> >> >>
> >> >>
> >> >>
> >> >> --
> >> >> Edoardo Sabadelli
> >> >> DHIS 2
> >> >> University of Oslo
> >> >> edoardo@xxxxxxxxx
> >> >> http://www.dhis2.org
> >> >
> >> >
> >>
> >>
> >>
> >> --
> >> Edoardo Sabadelli
> >> DHIS 2
> >> University of Oslo
> >> edoardo@xxxxxxxxx
> >> http://www.dhis2.org
> >
> >
>
>
>
> --
> Edoardo Sabadelli
> DHIS 2
> University of Oslo
> edoardo@xxxxxxxxx
> http://www.dhis2.org
>

Follow ups

References