Re: Graphing Solution...

2018-05-28 Thread panagiotis merakos via use-livecode
Hi Glen,

The best place to start is probably the LC Dictionary:

Open Dictionary -> Go to tab "Guide" -> Click on "Extending LiveCode"
section

Best,
Panos
--

On Mon, May 28, 2018 at 2:18 PM, Glen Bojsza via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Thanks everyone for your suggestions and code.
>
> Never having made a widget is there any youtube videos explaining the
> framework?
>
> Is there a book or guide specifically working with lcb?
>
> regards,
>
> Glen
>
>
> >
> ___
> use-livecode mailing list
> use-livecode@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Graphing Solution...

2018-05-28 Thread Glen Bojsza via use-livecode
Thanks everyone for your suggestions and code.

Never having made a widget is there any youtube videos explaining the
framework?

Is there a book or guide specifically working with lcb?

regards,

Glen


>
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Graphing Solution...

2018-05-27 Thread Mike Bonner via use-livecode
Actually, change 2 lines and I think it'll work better:
Line 932, change to:  updateGridRect(rectangle [gridLeft(), tPadding +
tNeededTop, mWidth - tPadding - mMaxYLabelWidth, gridBottom()])

Line 1061 change to: fill text tString at left of rectangle [tYRight +
gridPadding(),tY-20,tYRight + mMaxYLabelWidth + gridPadding(),tY+20] on
this canvas


On Sun, May 27, 2018 at 10:05 PM, Mike Bonner  wrote:

> I floundered around cluelessly with it for a bit, randomly changing a few
> things till I got something that seems to work.  I'm sure there are things
> I still misunderstand about this, and that I've added code that probably
> doesn't need to be there.  Also not sure if there will be issues with
> larger labels etc, but if you're interested, the modified stuff can be
> found here: https://www.dropbox.com/s/bsj0u87tlg54xt2/com.livecode.widget.
> linegraphyright.zip?dl=1
>
> If you do a diff of the stock lcb and the lcb in the zip archive, you can
> see all my (unremarked) floundering differences.  As it sits though, the
> default data comes up and displays fine.  Just checked with larger values,
> some of the numbers I poked in there should probably be increased a little,
> though i'm sure theres a better way to calculate such things.
>
> On Sun, May 27, 2018 at 9:28 PM, Brian Milby via use-livecode <
> use-livecode@lists.runrev.com> wrote:
>
>> Here is the link on GitHub...
>>
>> https://github.com/livecode/livecode/tree/develop/extensions
>> /widgets/graph
>>
>> On May 27, 2018, 10:24 PM -0500, Mark Wieder via use-livecode <
>> use-livecode@lists.runrev.com>, wrote:
>> > On 05/27/2018 07:15 PM, Glen Bojsza via use-livecode wrote:
>> > > Hi Brian,
>> > >
>> > > They are good ideas...I haven't done anything with widgets.
>> > >
>> > > How do I get access to the source code?
>> >
>> > The source file is graph.lcb, and where it's stored depends on what
>> > operating system you're working with.
>> >
>> > /Extensions/com.livecode.widget.linegraph
>> >
>> > so on my linux system, I've got it in
>> > /opt/livecodecommunity-9.0.0.x86_64/Extensions...
>> >
>> > and obviously it will be in different places on Windows and OSX.
>> >
>> > But beware that coding in LCB is quite different from "normal" LiveCode
>> > coding. Copy the source file, put it into its own folder somewhere, edit
>> > it (it's a text file), then open it in the extension builder and test
>> > the changes. Have fun.
>> >
>> > --
>> > Mark Wieder
>> > ahsoftw...@gmail.com
>> >
>> > ___
>> > use-livecode mailing list
>> > use-livecode@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@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Graphing Solution...

2018-05-27 Thread Mike Bonner via use-livecode
I floundered around cluelessly with it for a bit, randomly changing a few
things till I got something that seems to work.  I'm sure there are things
I still misunderstand about this, and that I've added code that probably
doesn't need to be there.  Also not sure if there will be issues with
larger labels etc, but if you're interested, the modified stuff can be
found here:
https://www.dropbox.com/s/bsj0u87tlg54xt2/com.livecode.widget.linegraphyright.zip?dl=1


If you do a diff of the stock lcb and the lcb in the zip archive, you can
see all my (unremarked) floundering differences.  As it sits though, the
default data comes up and displays fine.  Just checked with larger values,
some of the numbers I poked in there should probably be increased a little,
though i'm sure theres a better way to calculate such things.

On Sun, May 27, 2018 at 9:28 PM, Brian Milby via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Here is the link on GitHub...
>
> https://github.com/livecode/livecode/tree/develop/extensions/widgets/graph
>
> On May 27, 2018, 10:24 PM -0500, Mark Wieder via use-livecode <
> use-livecode@lists.runrev.com>, wrote:
> > On 05/27/2018 07:15 PM, Glen Bojsza via use-livecode wrote:
> > > Hi Brian,
> > >
> > > They are good ideas...I haven't done anything with widgets.
> > >
> > > How do I get access to the source code?
> >
> > The source file is graph.lcb, and where it's stored depends on what
> > operating system you're working with.
> >
> > /Extensions/com.livecode.widget.linegraph
> >
> > so on my linux system, I've got it in
> > /opt/livecodecommunity-9.0.0.x86_64/Extensions...
> >
> > and obviously it will be in different places on Windows and OSX.
> >
> > But beware that coding in LCB is quite different from "normal" LiveCode
> > coding. Copy the source file, put it into its own folder somewhere, edit
> > it (it's a text file), then open it in the extension builder and test
> > the changes. Have fun.
> >
> > --
> > Mark Wieder
> > ahsoftw...@gmail.com
> >
> > ___
> > use-livecode mailing list
> > use-livecode@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@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Graphing Solution...

2018-05-27 Thread Brian Milby via use-livecode
Here is the link on GitHub...

https://github.com/livecode/livecode/tree/develop/extensions/widgets/graph

On May 27, 2018, 10:24 PM -0500, Mark Wieder via use-livecode 
, wrote:
> On 05/27/2018 07:15 PM, Glen Bojsza via use-livecode wrote:
> > Hi Brian,
> >
> > They are good ideas...I haven't done anything with widgets.
> >
> > How do I get access to the source code?
>
> The source file is graph.lcb, and where it's stored depends on what
> operating system you're working with.
>
> /Extensions/com.livecode.widget.linegraph
>
> so on my linux system, I've got it in
> /opt/livecodecommunity-9.0.0.x86_64/Extensions...
>
> and obviously it will be in different places on Windows and OSX.
>
> But beware that coding in LCB is quite different from "normal" LiveCode
> coding. Copy the source file, put it into its own folder somewhere, edit
> it (it's a text file), then open it in the extension builder and test
> the changes. Have fun.
>
> --
> Mark Wieder
> ahsoftw...@gmail.com
>
> ___
> use-livecode mailing list
> use-livecode@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Graphing Solution...

2018-05-27 Thread Mark Wieder via use-livecode

On 05/27/2018 07:15 PM, Glen Bojsza via use-livecode wrote:

Hi Brian,

They are good ideas...I haven't done anything with widgets.

How do I get access to the source code?


The source file is graph.lcb, and where it's stored depends on what 
operating system you're working with.


/Extensions/com.livecode.widget.linegraph

so on my linux system, I've got it in
/opt/livecodecommunity-9.0.0.x86_64/Extensions...

and obviously it will be in different places on Windows and OSX.

But beware that coding in LCB is quite different from "normal" LiveCode 
coding. Copy the source file, put it into its own folder somewhere, edit 
it (it's a text file), then open it in the extension builder and test 
the changes. Have fun.


--
 Mark Wieder
 ahsoftw...@gmail.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Graphing Solution...

2018-05-27 Thread Glen Bojsza via use-livecode
Hi Brian,

They are good ideas...I haven't done anything with widgets.

How do I get access to the source code?


On Sun, May 27, 2018 at 8:40 PM Brian Milby via use-livecode <
use-livecode@lists.runrev.com> wrote:

> In LC9, you could possibly use the line graph widget.  The source is
> available, so you could modify it to support dual y-axis (but I'll admit
> this wouldn't be trivial to complete).
>
> A possibly easier modification would be to add the ability to display the y
> labels on the right side.  Then you could use 2 widget instances, properly
> aligned, to display the data.  The first series in an instance with the
> left labels and the second in the one with right labels.
>
> Another option, depending on how much data is being displayed (and if you
> need the ability to select a point on the graph and display the value -
> which would probably require the first solution), would be to fake it  .
> You could take the data for the first y scale and then map the next series
> to those values for graphing.  Then you would just need to display another
> scale on the right side of the chart to show the values.
>
> So for s1 = 1, 2, 3; s2 = 30, 20, 10
> You would graph s1 = 1, 2, 3; s2 = 3, 2, 1 (but have a label on the right
> going from 10 to 30)
>
> Thanks,
> Brian
>
> On Sun, May 27, 2018 at 2:21 PM, Glen Bojsza via use-livecode <
> use-livecode@lists.runrev.com> wrote:
>
> > Hello,
> >
> > I am trying to find a graphing solution that will support dual y - axis
> > line plots.
> >
> > Both sets of data need to be plotted on the same graph so the left Y
> scale
> > is used for one set of data that is plotted and the right Y scale is for
> > the other set of data.
> >
> > From what I have found neither ChartMaker or ChartsEngine support this
> type
> > of plot.
> >
> > Does anyone have any suggestions?
> >
> > thanks,
> >
> > Glen
> > ___
> > use-livecode mailing list
> > use-livecode@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@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Graphing Solution...

2018-05-27 Thread Brian Milby via use-livecode
In LC9, you could possibly use the line graph widget.  The source is
available, so you could modify it to support dual y-axis (but I'll admit
this wouldn't be trivial to complete).

A possibly easier modification would be to add the ability to display the y
labels on the right side.  Then you could use 2 widget instances, properly
aligned, to display the data.  The first series in an instance with the
left labels and the second in the one with right labels.

Another option, depending on how much data is being displayed (and if you
need the ability to select a point on the graph and display the value -
which would probably require the first solution), would be to fake it  .
You could take the data for the first y scale and then map the next series
to those values for graphing.  Then you would just need to display another
scale on the right side of the chart to show the values.

So for s1 = 1, 2, 3; s2 = 30, 20, 10
You would graph s1 = 1, 2, 3; s2 = 3, 2, 1 (but have a label on the right
going from 10 to 30)

Thanks,
Brian

On Sun, May 27, 2018 at 2:21 PM, Glen Bojsza via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Hello,
>
> I am trying to find a graphing solution that will support dual y - axis
> line plots.
>
> Both sets of data need to be plotted on the same graph so the left Y scale
> is used for one set of data that is plotted and the right Y scale is for
> the other set of data.
>
> From what I have found neither ChartMaker or ChartsEngine support this type
> of plot.
>
> Does anyone have any suggestions?
>
> thanks,
>
> Glen
> ___
> use-livecode mailing list
> use-livecode@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Graphing Solution...

2018-05-27 Thread Glen Bojsza via use-livecode
Hello,

I am trying to find a graphing solution that will support dual y - axis
line plots.

Both sets of data need to be plotted on the same graph so the left Y scale
is used for one set of data that is plotted and the right Y scale is for
the other set of data.

>From what I have found neither ChartMaker or ChartsEngine support this type
of plot.

Does anyone have any suggestions?

thanks,

Glen
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode