<div><div dir="auto">So, I'm a few days trying to create the visualizariojs for the statistics. I tried with qwt and qtcharts but I didn't managed to have anything that I liked, so I started today getting rid of it and actually using the same code that I did for the profile.</div><div dir="auto"><br></div><div dir="auto">This way I can Taylor for what I want instead of being locked In the ugliness of qwt of the lack of options for qt charts.</div><div dir="auto"><br></div><div dir="auto">Currently in the qt charts branch I can plot correct data generating an incorrect graph</div><div dir="auto"><br></div><div dir="auto">And I can plot the coordinate system but no data yet on the profile based chart library.</div><div dir="auto"><br></div><div dir="auto">It was good to see that I managed to create an actual good library for the profile that I could detach and use for other unrelated graphs with minimal modifications.</div><div dir="auto"><br></div><div dir="auto">Today I'll probably be able to present something worth of your time.</div><div dir="auto"><br></div><div dir="auto"><br></div><br><div class="gmail_quote"><div>On Wed 19. Jul 2017 at 21:34, Willem Ferguson <<a href="mailto:willemferguson@zoology.up.ac.za">willemferguson@zoology.up.ac.za</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 19/07/2017 18:45, Tomaz Canabrava wrote:<br>
> Hey people,<br>
><br>
> I'll have one week to work on subsurface because of Akademy, without<br>
> work or wife interference :)<br>
> So I really think I'll be able to do something good there.<br>
><br>
> About the mockups - they are good for desktop but they don't take into<br>
> account mobile.<br>
> but I'll try to do that.<br>
><br>
> Tomaz<br>
Tomaz,<br>
That would be great. There is one issue we discussed that was not<br>
finalised, the number of bars in each of the histograms. You could<br>
initially use a fixed scheme and I or someone else could adapt it<br>
afterwards to be more flexible without UI intervention. Alternatively,<br>
here is a (sort of) algorithm that is likely to work to calculate the<br>
number of bars. Maybe you have your own ideas, then please ignore all of<br>
this.<br>
<br>
# For each histogram:<br>
# -------------------<br>
binvalue = {1.0, 2.0, 2.5, 5.0, 10.0, 20.0}<br>
Find minimum and maximum values of data to be graphed<br>
range = maximum-minimum<br>
BinSize = binvalue with size just > (range/10)<br>
# e.g. if (range/10 == 3) then BinSize = 5;<br>
# with our testdata (range/10=5.6969) then BinSize=10<br>
Startvalue = largest multiple of BinSize just < minimum<br>
<br>
In case that my help you, I attach a LibreOffice spreadsheet that uses<br>
this algorithm on a dataset of 54 values (the blue column).<br>
Ignore the multiplier value. A histogram (red bars) representing these<br>
values is also shown. Unfortunately LibreOffice does not place the<br>
numbers below the graph in the correct places.<br>
Basically this uses part of the calculations one would do anyway to draw<br>
a histogram. Only difference is that we dynamically determine BinSize<br>
and Startvalue based on the chracteristics of the data.<br>
I attach an image if what that histogram should look like if all labels<br>
were written correctly. The bars can be wider and touching or narrower<br>
like in the attached jpg file. I personally prefer wider bars.<br>
<br>
I hope this is understandable.<br>
<br>
Kind regards,<br>
willem<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
subsurface mailing list<br>
<a href="mailto:subsurface@subsurface-divelog.org" target="_blank">subsurface@subsurface-divelog.org</a><br>
<a href="http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface" rel="noreferrer" target="_blank">http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface</a><br>
</blockquote></div></div>