It is currently Wed Sep 18, 2019 9:01 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 57 posts ]  Go to page Previous  1, 2, 3, 4  Next
Author Message
 Post subject: Re: [Module] Chart - Gadget
PostPosted: Tue Jun 18, 2019 12:54 pm 
Offline
User
User

Joined: Sun Aug 02, 2015 7:17 pm
Posts: 19
Refer to the code here :)
https://github.com/mity/mctrl
Image


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] Chart - Gadget
PostPosted: Tue Jun 18, 2019 1:01 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Thu Mar 25, 2004 2:15 pm
Posts: 699
Location: Spain
Thorsten1867 wrote:
A chart with horizontal bars and a line chart are planned.
Yeah!

_________________
PB 5.7x, PureVision User.


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] Chart - Gadget
PostPosted: Tue Jun 18, 2019 3:00 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 892
Location: Germany
Update: Bar Chart with horizontal bars

Image

_________________
Sorry for my English. My language is German.
(Translated with http://www.DeepL.com/Translator)

Download of PureBasic - Modules (GitHub)

[Windows 10 x64] [PB V5.7x]


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] Chart - Gadget
PostPosted: Tue Jun 18, 2019 3:13 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 892
Location: Germany
diskay wrote:
Refer to the code here :)
https://github.com/mity/mctrl

Nice, but only for Windows.
My module should also work under MacOS and Linux. :D

_________________
Sorry for my English. My language is German.
(Translated with http://www.DeepL.com/Translator)

Download of PureBasic - Modules (GitHub)

[Windows 10 x64] [PB V5.7x]


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] Chart - Gadget
PostPosted: Tue Jun 18, 2019 10:40 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Thu Mar 25, 2004 2:15 pm
Posts: 699
Location: Spain
Could you check why vertical axis values are duplicated?

I am using Example 1 (automatically adjust maximum value), but it happens exactly the same with other examples and using the attribute 'Chart::#Maximum'

Image

Thank you!

_________________
PB 5.7x, PureVision User.


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] Chart - Gadget
PostPosted: Wed Jun 19, 2019 10:41 am 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 892
Location: Germany
Update: Line Chart

Image

@zikitrake
Bug fixed

_________________
Sorry for my English. My language is German.
(Translated with http://www.DeepL.com/Translator)

Download of PureBasic - Modules (GitHub)

[Windows 10 x64] [PB V5.7x]


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] Chart - Gadget
PostPosted: Wed Jun 19, 2019 2:15 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Thu Mar 25, 2004 2:15 pm
Posts: 699
Location: Spain
Thorsten1867 wrote:
Update: Line Chart

Image

I love you!! :D
Thorsten1867 wrote:
@zikitrake
Bug fixed
Very much!

_________________
PB 5.7x, PureVision User.


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] Chart - Gadget
PostPosted: Wed Jun 19, 2019 5:55 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 892
Location: Germany
@zikitrake
Line charts become really interesting if they are combined with data series. :wink:

Update: Line chart for data series

Image

_________________
Sorry for my English. My language is German.
(Translated with http://www.DeepL.com/Translator)

Download of PureBasic - Modules (GitHub)

[Windows 10 x64] [PB V5.7x]


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] Chart - Gadget
PostPosted: Wed Jun 19, 2019 9:06 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Thu Mar 25, 2004 2:15 pm
Posts: 699
Location: Spain
Thorsten1867 wrote:
@zikitrake
Line charts become really interesting if they are combined with data series. :wink:
...
Nice! :D

This is really interesting for me, as I plan to add graphics of this style to my project:
Image


Would it be possible to:
- Add an option to hide the labels of the series? (I would put them manually in a List Gadget)
- Invert vertical values from top to bottom? as this image
Image

Really thank you!

_________________
PB 5.7x, PureVision User.


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] Chart - Gadget
PostPosted: Thu Jun 20, 2019 1:07 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 892
Location: Germany
Update:
  • Added: #Hide for hiding legend
  • Addes: #Descending for descending numbering of the y-axis in line charts
  • Bugfixes

_________________
Sorry for my English. My language is German.
(Translated with http://www.DeepL.com/Translator)

Download of PureBasic - Modules (GitHub)

[Windows 10 x64] [PB V5.7x]


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] Chart - Gadget
PostPosted: Thu Jun 20, 2019 1:36 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Thu Mar 25, 2004 2:15 pm
Posts: 699
Location: Spain
Thorsten1867 wrote:
Update:
  • Added: #Hide for hiding legend
  • Addes: #Descending for descending numbering of the y-axis in line charts
  • Bugfixes

:shock: Yeah, it works like a charm!
Sorry to be so heavy asking for additions but, hey! you're creating a first class module :oops:

Again, thank you so much!

Edit:An issue when #Descendig is activated: Chart::SetAttribute(#Chart, Chart::#Minimum, 1) is ignored :)

_________________
PB 5.7x, PureVision User.


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] Chart - Gadget
PostPosted: Thu Jun 20, 2019 3:08 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Thu Mar 25, 2004 2:15 pm
Posts: 699
Location: Spain
More about previous comented issue

This image is made when #descending is activated and define a Chart::SetAttribute(#Chart, Chart::#Minimum, 1)
Image

I did a change in Procedure DrawLineChart_(), changing
Code:
Range = Maximum - Minimum
to
Code:
If Chart()\Line\Flags & #Descending
  Range = Maximum
Else
   Range = Maximum - Minimum
EndIf

And
Code:
Text$ = Str(Factor * n)
to
Code:
Text$ = Str(Factor * n + Minimum)

Then it seem to works fine
Image

PS: I'm sure my code is a botched job. :lol:

_________________
PB 5.7x, PureVision User.


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] Chart - Gadget
PostPosted: Thu Jun 20, 2019 4:31 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 892
Location: Germany
@ zikitrake
Bug fixed and another little bonus.


Update: Bezier curves for line charts (#BezierCurve)

Image

_________________
Sorry for my English. My language is German.
(Translated with http://www.DeepL.com/Translator)

Download of PureBasic - Modules (GitHub)

[Windows 10 x64] [PB V5.7x]


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] Chart - Gadget
PostPosted: Thu Jun 20, 2019 7:58 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Thu Mar 25, 2004 2:15 pm
Posts: 699
Location: Spain
Thorsten1867 wrote:
@ zikitrake
Bug fixed and another little bonus.
Update: Bezier curves for line charts (#BezierCurve)

Nice!!!
Image

_________________
PB 5.7x, PureVision User.


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] Chart - Gadget
PostPosted: Fri Jun 21, 2019 9:43 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Thu Mar 25, 2004 2:15 pm
Posts: 699
Location: Spain
Turning with the petitions!

- Do you plan to add Tooltips to items? I modified your code (awkwardly) to add a MouseMove event, but it doesn't go very fine :)
Image


- (I don't know whether to consider this a request because I don't know if it will be of general interest :? ) : Could you make a value be hidden when it exceeds the Chart::#Minimum/Chart::#Maximum?

For example, in this graph I have assigned minimum value = 1 and maximum value = 100. When a value exceeds 100 I would like it to be hidden (or show a label 'out' for example :) )
Image

PS: Tomorrow I'm going on a week' holiday, so I'll stop grilling you! :oops:

_________________
PB 5.7x, PureVision User.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 57 posts ]  Go to page Previous  1, 2, 3, 4  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 15 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye