ChartGadget for bars and lines

Developed or developing a new product in PureBasic? Tell the world about it.
User avatar
Danilo
Addict
Addict
Posts: 3037
Joined: Sat Apr 26, 2003 8:26 am
Location: Planet Earth

Re: ChartGadget for bars and lines

Post by Danilo »

I see 4 "Download"-Buttons on this file hosting page, and it is all about advertisements.

Wouldn't it be possible to use OneDrive, DropBox, GitHub, Bitbucket, SourceForge?
uwekel
Enthusiast
Enthusiast
Posts: 740
Joined: Sat Dec 03, 2011 5:54 pm
Location: Oldenburg (Germany)

Re: ChartGadget for bars and lines

Post by uwekel »

This is really disappointing :-( I didn't see that because of my AddBlocker. I attached the source code to the topmost post again.
PB 5.70 LTS (x64) - Debian Testing, Gnome 3.30.2
User avatar
Danilo
Addict
Addict
Posts: 3037
Joined: Sat Apr 26, 2003 8:26 am
Location: Planet Earth

Re: ChartGadget for bars and lines

Post by Danilo »

uwekel wrote:I attached the source code to the topmost post again.
Thanks! Your source is open source, so at the end it's probably better to use
GitHub or Bitbucket for it. When you reach the forum limits...
User avatar
roslansalleh
User
User
Posts: 19
Joined: Fri Dec 21, 2012 3:45 am

Re: ChartGadget for bars and lines

Post by roslansalleh »

Dear Uwekel I am trying using your chartgadget. It's very nice.
I tried to show only line graph so I commented 4 lines as below code and try to run but
the line didn't display on the graph. Why. Are there any flag I missed.

Code: Select all

    ;add some data rows
;     ChartRow(0, "Positive", #ChartRowTypeBar, $009060)     -------Commented
;     ChartRow(0, "Negative", #ChartRowTypeBar, $2020E0)     -------Commented
    ChartRow(0, "Average", #ChartRowTypeLine, $00D7FF, #ChartRowFlagValues)
    
    ;add some data columns
    For i = 1 To 12
      month.s = StringField("Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec", i, "|")
      ChartColumn(0, month)
      
      ;add a value for each row and column
      positive = Random(9, 1) * 10
      negative = Random(9, 1) * -10
;       ChartValue(0, "Positive", month, positive)     -------Commented
;       ChartValue(0, "Negative", month, negative)     -------Commented
      ChartValue(0, "Average", month, (positive + negative) / 2)
    Next
    
    ;refresh the chart
    ChartPaint(0)
Please help me.
uwekel
Enthusiast
Enthusiast
Posts: 740
Joined: Sat Dec 03, 2011 5:54 pm
Location: Oldenburg (Germany)

Re: ChartGadget for bars and lines

Post by uwekel »

It's a bug :( The line row for its own does not widen the chart value range. I will fix it later this day!
PB 5.70 LTS (x64) - Debian Testing, Gnome 3.30.2
uwekel
Enthusiast
Enthusiast
Posts: 740
Joined: Sat Dec 03, 2011 5:54 pm
Location: Oldenburg (Germany)

Re: ChartGadget for bars and lines

Post by uwekel »

I fixed the bug and updated the code at top of this post.
Would you mind testing it?
PB 5.70 LTS (x64) - Debian Testing, Gnome 3.30.2
User avatar
roslansalleh
User
User
Posts: 19
Joined: Fri Dec 21, 2012 3:45 am

Re: ChartGadget for bars and lines

Post by roslansalleh »

Yes. It's work now. Thanks Mr. Uwekel.

One more thing. When I resizing the window it's look like the program freeze for a while or not responding
for a little bit time. May be due to my laptop is too old.

Thanks.
ricardo
Addict
Addict
Posts: 2402
Joined: Fri Apr 25, 2003 7:06 pm
Location: Argentina

Re: ChartGadget for bars and lines

Post by ricardo »

Hi,

Is this code free for use in any application?
ARGENTINA WORLD CHAMPION
uwekel
Enthusiast
Enthusiast
Posts: 740
Joined: Sat Dec 03, 2011 5:54 pm
Location: Oldenburg (Germany)

Re: ChartGadget for bars and lines

Post by uwekel »

Yes, no problem.
PB 5.70 LTS (x64) - Debian Testing, Gnome 3.30.2
ricardo
Addict
Addict
Posts: 2402
Joined: Fri Apr 25, 2003 7:06 pm
Location: Argentina

Re: ChartGadget for bars and lines

Post by ricardo »

Great!!

Thanks :)
ARGENTINA WORLD CHAMPION
agb2008
User
User
Posts: 60
Joined: Fri Jan 15, 2016 2:22 pm

Re: ChartGadget for bars and lines

Post by agb2008 »

uwekel:

Thank you for this great ChartGadget implementation !

Would it be possible to adjust ChartGadget (or create new one based on ChartGadget code) that would
allow to display 2D Graph ? I.e. array of X,Y values... Or there is already gadget that could display such graph ?
User avatar
mk-soft
Always Here
Always Here
Posts: 5335
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: ChartGadget for bars and lines

Post by mk-soft »

Thanks :wink:

Small bugfix for MacOS with DrawingFont(...) by ChartPaint(...)

Code: Select all

       ;create and measure font
        If \Font
          DrawingFont(\Font)
        EndIf
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
User avatar
Kukulkan
Addict
Addict
Posts: 1352
Joined: Mon Jun 06, 2005 2:35 pm
Location: germany
Contact:

Re: ChartGadget for bars and lines

Post by Kukulkan »

Great gadget and looking very professional. Good work! :D
Post Reply