Hi Pawan, AFAIK We are using vizGrammer library in widget generation in carbon-dashboards 2.1.x version. Please find the analytics libraries which is used in carbon-dashboards here[1].
[1] - https://github.com/wso2/carbon-dashboards/tree/2.1.x/apps/portal/libs/analytics-wso2_5.0.12 Thanks, Nisala On Fri, Mar 24, 2017 at 2:22 PM, Pawan Gunaratne <[email protected]> wrote: > Hi, > > I need to clarify that gadget creation in carbon-dashboard, are we still > using that lgviz library or moved to VizGrammer ? > > Thanks. > > On Thu, Mar 23, 2017 at 12:37 PM, Udara Rathnayake <[email protected]> > wrote: > >> Thanks Tharik! >> >> Updated my wso2-widget WC to use VizGrammer, but it seems we have a bunch >> of document.getElementById()s which is not going to search inside shadow >> roots. So this is not going to work :( . Let me look into other >> alternatives. >> >> On Thu, Mar 23, 2017 at 12:11 PM, Tharik Kanaka <[email protected]> wrote: >> >>> Hi Udara, >>> >>> Igviz library is no longer used and we have replaced that with >>> VizGrammar. In VizGrammar you can use draw() function to draw the chart in >>> a div. If you want to insert records to update the chart you can use >>> insert(). You can try samples [1] and all the library content along with >>> samples are available in github repository [2]. >>> >>> *var data = {* >>> * "metadata" : {* >>> * "names" : ["rpm","torque","horsepower", "EngineType"],* >>> * "types" : ["linear","linear", "ordinal","ordinal"]* >>> * },* >>> * "data": [* >>> * [1, 10, 1, "Piston"], [2, 12, 5, "Piston"]]* >>> *};* >>> >>> *var config = {* >>> * charts : [{type: "area", x : "rpm", y : "torque"}],* >>> * maxLength: 10,* >>> * width: 400,* >>> * height: 200* >>> *}* >>> >>> *var chart = new vizg(data, **config**);* >>> >>> *chart.draw("#chartDiv");* >>> >>> *chart.insert([[8000, 74, 120, "Rotary"]]);* >>> >>> [1] http://wso2.github.io/VizGrammar/samples/ >>> >>> [2] https://github.com/wso2/VizGrammar/ >>> >>> Thanks, >>> >>> >>> On Thu, Mar 23, 2017 at 11:42 AM, Udara Rathnayake <[email protected]> >>> wrote: >>> >>>> Hi all, >>>> >>>> I'm trying to create a web component (wso2-widget) to try-out >>>> capabilities which we can incorporate in to our widget rendering framework. >>>> >>>> Within my renderWidget function[1] I'm using the usual igviz.plot but >>>> unable to draw the chart inside container element which exists inside a >>>> shadow-root. Did some debugging but unable to find the place which >>>> breaks(No errors too). >>>> >>>> Appreciate any feedback on this. >>>> >>>> PS:- If you need to try out this, host the source within "wc" branch >>>> inside apache2 and use Google chrome. >>>> >>>> [1] https://github.com/udarakr/uuf-sample-gadget/blob/wc/wso2-wi >>>> dget/wso2-widget.comp.html#L121 >>>> >>>> -- >>>> Regards, >>>> UdaraR >>>> >>> >>> >>> >>> -- >>> >>> *Tharik Kanaka* >>> >>> WSO2, Inc | lean . enterprise . middleware >>> >>> Email: [email protected] | Web: www.wso2.com >>> >> >> >> >> -- >> Regards, >> UdaraR >> >> _______________________________________________ >> Dev mailing list >> [email protected] >> http://wso2.org/cgi-bin/mailman/listinfo/dev >> >> > > > -- > *Pawan Gunaratne* > Software Engineering Intern > *WSO2* > *Mob : 0770373556* > > _______________________________________________ > Dev mailing list > [email protected] > http://wso2.org/cgi-bin/mailman/listinfo/dev > > -- *Nisala Niroshana Nanayakkara,* Software Engineer Mobile:(+94)717600022 WSO2 Inc., http://wso2.com/
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
