Charts widget.

Mike Kerner MikeKerner at roadrunner.com
Mon Sep 26 17:11:28 EDT 2022


well, i learned something new.
i don't even see that widget in 9, but i do in 10.

On Mon, Sep 26, 2022 at 4:54 PM Alex Tweedly via use-livecode <
use-livecode at lists.runrev.com> wrote:

> No, I mean the chart widget (chart - not charts, my mistake).
>
> The graph (or linegraph) widget - com.livecode.widget.linegraph - does
> simple line graphs only.
>
> The chart widget - com.livecode.widget.chart - can do everything you
> ever imagined a chart could do, and more. (*)
>
> > The Chart widget is a wrapper forChart.js v3.7.0
> > <https://www.chartjs.org>in LiveCode. It allows you to create
> > beautiful and highly customizable charts, in a simple way. Data can be
> > displayed as a line graph, bar chart, radar chart, donut/pie chart,
> > polar chart, bubble chart or scatter plot.
> It really is wonderful - all kinds of charts, very fast, animations,
> etc. The only drawback I've found so far is that doing time sequence or
> date sequence charts needs some extra magic, and I don't know how to
> find that magic.
>
> Thanks for the suggestion of reading the .lcb; I probably couldn't have
> made sense of it anyway - but there is no .lcb file for the chart widget.
>
> It's just my bad luck that all the charts I want to do are the kind that
> is beyond me :-)
>
> Alex.
>
> (*) not quite true, I don't think it can do the complex time + bubble
> animations that Hans Rosling uses to such amazing effect -
>
> https://singularityhub.com/2010/12/09/hans-rosling-shows-you-200-years-of-global-growth-in-4-minutes-video/
>
> On 25/09/2022 23:21, Mike Kerner via use-livecode wrote:
> > do you mean the graph widget?
> > if that's what you mean, then...
> > sorry this isn't more helpful, but to get you started, the graph.lcb file
> > is in Tools/Extensions/com.livecode.widget.linegraph, if you want to try
> > reading through it.
> > it's only 1300 lines, total, including the docs. there is not that much
> > going on.
> > there are no private properties that i can see.
> >
> > On Sun, Sep 25, 2022 at 4:55 PM Alex Tweedly via use-livecode <
> > use-livecode at lists.runrev.com> wrote:
> >
> >> Anyone using this widget ?
> >>
> >> Is there some documentation (other than the obvious dictionary entries)
> >> about how to do different kinds of chart ?
> >>
> >> In the last 4-6 months, I've done 3 or 4 little personal projects where
> >> I wanted to create a chart, but I've not been able to figure out how to
> >> use the charts widget to do time-based charts.
> >>
> >> What I mean is, e.g., create a chart for the following data ....
> >>
> >> 2022-02-01    100
> >> 2022-02-04    500
> >> 2022-02-05    525
> >> 2022-02-17    900
> >> ....
> >>
> >> Obviously, the dates along the X-axis should be spaced properly
> >> according to their data value, not equally spaced and simply labelled.
> >>
> >> Looking at the charts.js documentation, it tells me (or rather, fails to
> >> tell me, since I can't understand it) that I need to define an 'adapter'
> >> and shows some sample javascript. I don't really understand how to do it
> >> simply in javascript - far less how I could use that in the widget.
> >>
> >> Can anyone give me a clue or a pointer ?
> >>
> >> Many thanks,
> >>
> >> Alex.
> >>
> >> P.S. currently I solved it using my own GraphMaker library (see LC
> >> conference from 2018) - but I'd really like to retire that library in
> >> favour of the new widget.
> >>
> >>
> >>
> >> _______________________________________________
> >> use-livecode mailing list
> >> use-livecode at lists.runrev.com
> >> Please visit this url to subscribe, unsubscribe and manage your
> >> subscription preferences:
> >> http://lists.runrev.com/mailman/listinfo/use-livecode
> >>
> >
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>


-- 
On the first day, God created the heavens and the Earth
On the second day, God created the oceans.
On the third day, God put the animals on hold for a few hours,
   and did a little diving.
And God said, "This is good."


More information about the use-livecode mailing list