Page 4 of 7

Re: [Module] Chart - Gadget

Posted: Thu Jul 04, 2019 8:11 pm
by Thorsten1867
Bug fixed

Re: [Module] Chart - Gadget

Posted: Fri Jul 05, 2019 10:32 am
by Lord
Thorsten1867 wrote:Bug fixed
Thanks for that.
But now: Example 13
If you click the green data point and then move the mouse, the
data point jumps 3 units below mousepointer.
As result of that, if you drag the point up to maximum of "80",
you can only reach a "76".
If you are going down and come to "0", the data point jumps
to "-1" and you can't reach or select the point anymore.

Re: [Module] Chart - Gadget

Posted: Fri Jul 05, 2019 12:23 pm
by Thorsten1867
Bugs fixed

Re: [Module] Chart - Gadget

Posted: Sat Jul 06, 2019 9:41 am
by Lord
Thorsten1867 wrote:Bugs fixed
Thanks for that.

Again example 15:

Drop down menu entries only work on the small colored symbols,
despite the occurence of the drop menu in the drawing area.
After hiding "Series 3" via drop down, "Display 'Series 3'" doesn't
display these data again. This is true for all data.

Re: [Module] Chart - Gadget

Posted: Sat Jul 06, 2019 10:42 am
by Thorsten1867
Bugfixes: Code and Example

Re: [Module] Chart - Gadget

Posted: Wed Jul 24, 2019 1:04 am
by zikitrake
Hi Thorsten1867, I'm back here to see if you can solve 2 things :)

1º) When the flag Chart::#PostEvents is active (as in example #15) even if you click the left mouse button it always detects #PB_EventType_RightClick EventType()

Image

2º) When I activate the flag Chart::#OutOfRange but I have deactivated the display of values, when a value is out of range it always appears (Whether or not the flag Chart::#OutOfRange is activated)

Image

It would be possible to hide this value (optionally or permanently)

As always, thank you so much for your work (and for reading to me).

Re: [Module] Chart - Gadget

Posted: Wed Jul 24, 2019 9:54 am
by Thorsten1867
Update: Bugfixes

Re: [Module] Chart - Gadget

Posted: Wed Jul 24, 2019 1:13 pm
by zikitrake
Thorsten1867 wrote:Update: Bugfixes
:D Thank you. It works fine now!

Re: [Module] Chart - Gadget

Posted: Wed Jul 24, 2019 4:45 pm
by skywalk
Hi Thorsten1867, this is looking great. 8)
Will you be adding scatter plots? Meaning floating point X's and Y's.

Re: [Module] Chart - Gadget

Posted: Wed Jul 24, 2019 6:29 pm
by Thorsten1867
I've never used a scatterplot before.
Would you perhaps have an example so I can better imagine what the input data looks like?

Re: [Module] Chart - Gadget

Posted: Sat Jul 27, 2019 4:31 pm
by Thorsten1867
Update: Scatter Plot

Image

Re: [Module] Chart - Gadget

Posted: Sat Jul 27, 2019 7:22 pm
by skywalk
Cool, I will check it out. 8)
Scatter plots dominate my many reports.
Line charts/bar graphs are used for paretos, histograms.
Heat maps are the next trick!

Re: [Module] Chart - Gadget

Posted: Wed Dec 11, 2019 2:38 pm
by Thorsten1867
Update: Flags #Left/#Right for legend added

Re: [Module] Chart - Gadget

Posted: Wed Mar 04, 2020 5:09 pm
by cyril
Hello Thorsten1867

I'm trying to use ScatterPlot with date on the X axes and double on the Y axes.
I'm using

Code: Select all

Procedure ChartCreate(x, y, width, height)
  Chart::Gadget(#Gadget_Chart, x, y, width, height, Chart::#ScatterPlot|Chart::#Border|Chart::#ShowLines|Chart::#ToolTips|Chart::#AutoResize, #Window_Main)
  Chart::SetFlags(#Gadget_Chart, Chart::#Legend, Chart::#PostEvents)
  Chart::SetFlags(#Gadget_Chart, Chart::#AxisX, Chart::#Time|Chart::#Labels)
  Chart::SetAttribute(#Gadget_Chart, Chart::#Decimals, 2)
  Chart::SetMask(#Gadget_Chart, Chart::#AxisX, "%dd/%mm/%yyyy")
  Chart::ToolTipText(#Gadget_Chart, Chart::#Scatter$ + ": " + Chart::#Time$ + " - " + Chart::#DataY$ + " kg")
EndProcedure
to create the chart, I'm iterating with

Code: Select all

Define day = Val(Right(ListeWeight()\Date, 2))
Define month = Val(Mid(ListeWeight()\Date, 5, 2))
Define year = Val(Left(ListeWeight()\Date, 4))
Chart::AddScatterItem(#Gadget_Chart, "Weight", WeightList()\Date, Date(year, month, day, 0, 0, 0), WeightList()\Weight)
to add data to the chart. I'm losing the decimals on the Y axis.

It seems that AddScatterItem, takes quad as an argument for X and Y axes, so decimal value are lost.
Is there another way to do it with decimals ?

Re: [Module] Chart - Gadget

Posted: Thu Mar 05, 2020 11:44 am
by Thorsten1867
So I have to figure out how I'm gonna do this.

Gesendet von meinem Aquaris X2 mit Tapatalk