RE: [ANN] PlotKit 0.8 for Seaside

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

RE: [ANN] PlotKit 0.8 for Seaside

Mart-Mari Breedt
Hallo,

I really like the new charts, but am struggling a bit to figure out how
the labels for the PlotKit pie charts work. Seeing that there is not an
xTicks: accessor for the pie chart layout, one would assume that the
labels can be set in the dataset. But using a dataset like the one below
cause's nothing to be displayed, while passing numeric labels seems to
work fine.

dataset := PKDataset new
        name: 'data1';
        addX: 'A' y: 1;
        addX: 'B' y: 2;
        addX: 'C' y: 3;
        addX: 'D' y: 4;
        yourself

Kind regards,

Mart-Mari

-----Original Message-----
From: Philippe Marschall [mailto:[hidden email]]
Sent: 10 April 2006 10:42 nm
To: The Squeak Enterprise Aubergines Server - general discussion.
Subject: [Seaside] [ANN] PlotKit 0.8 for Seaside

Hi

Alastair Tse took the time and rewrote CanvasGraph.js from scratch and
called it PlotKit (http://www.liquidx.net/plotkit/). Now Seaise
bindings are available at: http://squeaksource.com/seachart/
So whats new:
- a new renderer that looks like Office 2007
- an experimental SVG backend
- IE emulation, yes it works in IE!

There is also a demo application available at:
http://seachart.seasidehosting.st/ that also displays some other
seachart components. It uses a free template by Andreas Viklund
(http://andreasviklund.com/)

Cheers
Philippe
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] PlotKit 0.8 for Seaside

Philippe Marschall
Hi

> I really like the new charts, but am struggling a bit to figure out how
> the labels for the PlotKit pie charts work. Seeing that there is not an
> xTicks: accessor for the pie chart layout, one would assume that the
> labels can be set in the dataset. But using a dataset like the one below
> cause's nothing to be displayed, while passing numeric labels seems to
> work fine.
>
> dataset := PKDataset new
>         name: 'data1';
>         addX: 'A' y: 1;
>         addX: 'B' y: 2;
>         addX: 'C' y: 3;
>         addX: 'D' y: 4;
>         yourself

You are right, #xTicks: would do the trick, but it's not there. The
reason I didn't put it in the pie layout options is that the
documentation says it's only available on line and bar layouts.
http://media.liquidx.net/js/plotkit-doc/PlotKit.Layout.html
As it turns out, the documentation is wrong and it works fine with a pie layout.

I published a new version (PlotKit-pmm.4) that adds #xTicks: to all
layout options, and updated the included demo to set the labels. I
also included a patch from the PlotKit mailinglist that allows to
disable filling and stroking for line charts.

A dataset is really just a collection of points and a string. If you
don't find the API a paragon of OOP then I agree. It's just a very
close mapping of the existing PlotKit API. This makes life for me much
easier.

If nothing is displayed this in general means that there was a
JavaScript exception. Firefox and Extensions (Javascript Console,
FireBug, Javascript Debugger) help in these cases.

Cheers
Philippe
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

RE: [ANN] PlotKit 0.8 for Seaside

Mart-Mari Breedt
In reply to this post by Mart-Mari Breedt
Hallo Philippe,

Thanks for all your effort. I am going to check this out right now.

Kind regards,

Mart-Mari

-----Original Message-----
From: Philippe Marschall [mailto:[hidden email]]
Sent: 25 April 2006 09:26 nm
To: The Squeak Enterprise Aubergines Server - general discussion.
Subject: Re: [Seaside] [ANN] PlotKit 0.8 for Seaside

Hi

> I really like the new charts, but am struggling a bit to figure out
how
> the labels for the PlotKit pie charts work. Seeing that there is not
an
> xTicks: accessor for the pie chart layout, one would assume that the
> labels can be set in the dataset. But using a dataset like the one
below

> cause's nothing to be displayed, while passing numeric labels seems to
> work fine.
>
> dataset := PKDataset new
>         name: 'data1';
>         addX: 'A' y: 1;
>         addX: 'B' y: 2;
>         addX: 'C' y: 3;
>         addX: 'D' y: 4;
>         yourself

You are right, #xTicks: would do the trick, but it's not there. The
reason I didn't put it in the pie layout options is that the
documentation says it's only available on line and bar layouts.
http://media.liquidx.net/js/plotkit-doc/PlotKit.Layout.html
As it turns out, the documentation is wrong and it works fine with a pie
layout.

I published a new version (PlotKit-pmm.4) that adds #xTicks: to all
layout options, and updated the included demo to set the labels. I
also included a patch from the PlotKit mailinglist that allows to
disable filling and stroking for line charts.

A dataset is really just a collection of points and a string. If you
don't find the API a paragon of OOP then I agree. It's just a very
close mapping of the existing PlotKit API. This makes life for me much
easier.

If nothing is displayed this in general means that there was a
JavaScript exception. Firefox and Extensions (Javascript Console,
FireBug, Javascript Debugger) help in these cases.

Cheers
Philippe
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] PlotKit 0.8 for Seaside

John Pierce-2
In reply to this post by Mart-Mari Breedt
Hi Philippe,

Thanks for PlotKit. It is looking really good. I do have a question
about color schemes. I like the Office Color schemes, but I need
something more tailored to my situation. So I want to use more primary
colors (bright red, green, blue, and what not) for my pie chart.

I'm not sure how to do this. I see PKColorScheme, but am not sure how
to pass it in to the Layout object or options object.

I've tried:

        self layout officeColors
                at: 'colorScheme' put: PKColorScheme light.

and:

        self layout options propertyAt: 'colorScheme' put: PKColorScheme light.

all to no avail. Any ideas on how I can use some of the ColorSchemes
instead of the office colors?

Regards,

John

On 4/25/06, Mart-Mari Breedt <[hidden email]> wrote:

> Hallo,
>
> I really like the new charts, but am struggling a bit to figure out how
> the labels for the PlotKit pie charts work. Seeing that there is not an
> xTicks: accessor for the pie chart layout, one would assume that the
> labels can be set in the dataset. But using a dataset like the one below
> cause's nothing to be displayed, while passing numeric labels seems to
> work fine.
>
> dataset := PKDataset new
>         name: 'data1';
>         addX: 'A' y: 1;
>         addX: 'B' y: 2;
>         addX: 'C' y: 3;
>         addX: 'D' y: 4;
>         yourself
>
> Kind regards,
>
> Mart-Mari
>
> -----Original Message-----
> From: Philippe Marschall [mailto:[hidden email]]
> Sent: 10 April 2006 10:42 nm
> To: The Squeak Enterprise Aubergines Server - general discussion.
> Subject: [Seaside] [ANN] PlotKit 0.8 for Seaside
>
> Hi
>
> Alastair Tse took the time and rewrote CanvasGraph.js from scratch and
> called it PlotKit (http://www.liquidx.net/plotkit/). Now Seaise
> bindings are available at: http://squeaksource.com/seachart/
> So whats new:
> - a new renderer that looks like Office 2007
> - an experimental SVG backend
> - IE emulation, yes it works in IE!
>
> There is also a demo application available at:
> http://seachart.seasidehosting.st/ that also displays some other
> seachart components. It uses a free template by Andreas Viklund
> (http://andreasviklund.com/)
>
> Cheers
> Philippe
> _______________________________________________
> Seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
> _______________________________________________
> Seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>


--
The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore, all
progress depends on the unreasonable man. -- George Bernard Shaw
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] PlotKit 0.8 for Seaside

Philippe Marschall
2006/5/3, John Pierce <[hidden email]>:

> Hi Philippe,
>
> Thanks for PlotKit. It is looking really good. I do have a question
> about color schemes. I like the Office Color schemes, but I need
> something more tailored to my situation. So I want to use more primary
> colors (bright red, green, blue, and what not) for my pie chart.
>
> I'm not sure how to do this. I see PKColorScheme, but am not sure how
> to pass it in to the Layout object or options object.
>
> I've tried:
>
>         self layout officeColors
>                 at: 'colorScheme' put: PKColorScheme light.
>
> and:
>
>         self layout options propertyAt: 'colorScheme' put: PKColorScheme light.
>
> all to no avail. Any ideas on how I can use some of the ColorSchemes
> instead of the office colors?

Hi

You are right, up until now there was no real support for custom
colors because the documentation of PlotKit in this area is lacking.
This is fixed with PlotKit-pmm.8.

You are now be able to do:
aChart layout  options colorSheme: PKPredefinedColorScheme light.

There is now also PKCustomColorScheme that allows you to specify
manually the colors  with Squeak Color instances. Color class >>
#wheel: is a good starting point.

Cheers
Philippe
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] PlotKit 0.8 for Seaside

John Pierce-2
Hi Philippe,

On 5/4/06, Philippe Marschall <[hidden email]> wrote:

<snip />

> You are right, up until now there was no real support for custom
> colors because the documentation of PlotKit in this area is lacking.
> This is fixed with PlotKit-pmm.8.
>
> You are now be able to do:
> aChart layout  options colorSheme: PKPredefinedColorScheme light.
>
> There is now also PKCustomColorScheme that allows you to specify
> manually the colors  with Squeak Color instances. Color class >>
> #wheel: is a good starting point.

Fantastic -- this works like a champ! Thanks much!

John

--
The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore, all
progress depends on the unreasonable man. -- George Bernard Shaw
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside