Page 2 of 7

Re: [Module] Chart - Gadget

Posted: Tue Jun 18, 2019 12:54 pm
by diskay
Refer to the code here :)
https://github.com/mity/mctrl
Image

Re: [Module] Chart - Gadget

Posted: Tue Jun 18, 2019 1:01 pm
by zikitrake
Thorsten1867 wrote:A chart with horizontal bars and a line chart are planned.
Yeah!

Re: [Module] Chart - Gadget

Posted: Tue Jun 18, 2019 3:00 pm
by Thorsten1867
Update: Bar Chart with horizontal bars

Image

Re: [Module] Chart - Gadget

Posted: Tue Jun 18, 2019 3:13 pm
by Thorsten1867
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

Re: [Module] Chart - Gadget

Posted: Tue Jun 18, 2019 10:40 pm
by zikitrake
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!

Re: [Module] Chart - Gadget

Posted: Wed Jun 19, 2019 10:41 am
by Thorsten1867
Update: Line Chart

Image

@zikitrake
Bug fixed

Re: [Module] Chart - Gadget

Posted: Wed Jun 19, 2019 2:15 pm
by zikitrake
Thorsten1867 wrote:Update: Line Chart

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

Re: [Module] Chart - Gadget

Posted: Wed Jun 19, 2019 5:55 pm
by Thorsten1867
@zikitrake
Line charts become really interesting if they are combined with data series. :wink:

Update: Line chart for data series

Image

Re: [Module] Chart - Gadget

Posted: Wed Jun 19, 2019 9:06 pm
by zikitrake
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!

Re: [Module] Chart - Gadget

Posted: Thu Jun 20, 2019 1:07 pm
by Thorsten1867
Update:
  • Added: #Hide for hiding legend
  • Addes: #Descending for descending numbering of the y-axis in line charts
  • Bugfixes

Re: [Module] Chart - Gadget

Posted: Thu Jun 20, 2019 1:36 pm
by zikitrake
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 :)

Re: [Module] Chart - Gadget

Posted: Thu Jun 20, 2019 3:08 pm
by zikitrake
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: Select all

Range = Maximum - Minimum
to

Code: Select all

If Chart()\Line\Flags & #Descending
  Range = Maximum
Else
   Range = Maximum - Minimum
EndIf
And

Code: Select all

Text$ = Str(Factor * n)
to

Code: Select all

Text$ = Str(Factor * n + Minimum)
Then it seem to works fine
Image

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

Re: [Module] Chart - Gadget

Posted: Thu Jun 20, 2019 4:31 pm
by Thorsten1867
@ zikitrake
Bug fixed and another little bonus.


Update: Bezier curves for line charts (#BezierCurve)

Image

Re: [Module] Chart - Gadget

Posted: Thu Jun 20, 2019 7:58 pm
by zikitrake
Thorsten1867 wrote:@ zikitrake
Bug fixed and another little bonus.
Update: Bezier curves for line charts (#BezierCurve)
Nice!!!
Image

Re: [Module] Chart - Gadget

Posted: Fri Jun 21, 2019 9:43 am
by zikitrake
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: