How to to draw a graph?

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

How to to draw a graph?

Dimitri Minich
Hi,
 I would like to draw a graph with Dolphin 4.
 I have a dictionary, the key is the date and the value is any double.
 Abscissa should represent the date and the y-axis the value.
 How can I do it?

 Thanks

 Dimitri


Reply | Threaded
Open this post in threaded view
|

Re: How to to draw a graph?

Christopher J. Demers
Dimitri Minich <[hidden email]> wrote in message
news:[hidden email]...
> Hi,
>  I would like to draw a graph with Dolphin 4.
>  I have a dictionary, the key is the date and the value is any double.
>  Abscissa should represent the date and the y-axis the value.
>  How can I do it?

One way might be to use an ActiveX graph program, perhaps MSGraph.  You
could try to interface with it directly, or send your data to Excel via
ActiveX and graph it from there.

Another approach would be to write your own graphing code in Dolphin.  It is
not too hard to do if you understand coordinate spaces and a few graphics
methods.  You could look at the Scribble example to see how to do the
graphics part of it.  The rest is simply a matter of scaling your data
values to screen display coordinates.  You can look at Canvas to see what
drawing methods there are.

Chris


Reply | Threaded
Open this post in threaded view
|

Re: How to to draw a graph?

Louis Sumberg-2
In reply to this post by Dimitri Minich
Dimitri,

You might also take a look at Ian Bartholomew's example app that has a
histogram.  It's the Buildview tutorial at http://www.iandb.org.uk/.

-- Louis


Reply | Threaded
Open this post in threaded view
|

Re: How to to draw a graph?

Costas
In reply to this post by Dimitri Minich
Also there is a section in Ted Brachts book The Dolphin Smalltalk
Companion. In there he shows how to build an xy linegraph. But looking
at his code you can figure out how to do bar charts and pie charts.

On 6 May 2002 05:04:59 -0700, [hidden email] (Dimitri Minich)
wrote:

>Hi,
> I would like to draw a graph with Dolphin 4.
> I have a dictionary, the key is the date and the value is any double.
> Abscissa should represent the date and the y-axis the value.
> How can I do it?
>
> Thanks
>
> Dimitri


Reply | Threaded
Open this post in threaded view
|

Re: How to to draw a graph?

Daryl Richter
In reply to this post by Christopher J. Demers
"Christopher J. Demers" <[hidden email]> writes:

> Dimitri Minich <[hidden email]> wrote in message
> news:[hidden email]...
> > Hi,
> >  I would like to draw a graph with Dolphin 4.
> >  I have a dictionary, the key is the date and the value is any double.
> >  Abscissa should represent the date and the y-axis the value.
> >  How can I do it?
>
> One way might be to use an ActiveX graph program, perhaps MSGraph.

I have used this control (technically called MSChart) frequently and
it is one of the more "friendly" ActiveX controls to use, perhaps
because it was never intended to stand alone but rather to be used by
other ActiveX applications.

[rest snipped]

--

Daryl Richter
Lead Programmer, Exelon Power Team

http://www.exeloncorp.com/powerteam