Project

General

Profile

Defect #86

Check problem with ranges in XYLine charts

Added by Patrick Talbot almost 14 years ago. Updated almost 14 years ago.

Status:
Closed
Priority:
High
Category:
charting
Target version:
-
Start date:
07/09/2010
Due date:
% Done:

100%

Estimated time:
Browser (if web client):

Description

From Nicholas Dunn:
See the sample attached. I created a new DB Server called growth_chart with fields: percentile(text), sex(text), chart_type(text), x_value(number), y_value(number). I have the values in an Excel sheet.

You will be able to tell from my method that I've been trying different parameters. When I change a parameter, sometimes the chart will show and sometimes not. Every once in a while I'll try a combination that just produces an empty box with a red "X" in the top left corner. I added an "X" marker to the chart that should have fallen on the 50th Percentile Line for a male child 28.5 months old and 90.71cm long. The mark is off because I can't get the chart to format correctly. Ideally I need the y axis to read 105 while the x axis reads 36.


Files

GrowthChart.rar (32.2 KB) GrowthChart.rar Patrick Talbot, 07/09/2010 04:47 PM
VelocityReport_test.servoy (348 KB) VelocityReport_test.servoy Nicholas Dunn, 07/13/2010 06:01 PM

Related issues

Related to VelocityReport Plugin - Defect #97: Spline renderer for Line/XYLine and Bar dataLineClosed07/20/2010

Actions

History

#1

Updated by Nicholas Dunn almost 14 years ago

If, for some reason, the sample solution I sent earlier doesn't work I am sending uploading another sample that uses the VelocityReports solution. I created a line using several x and y values, and also plotted markers using the same values. It really shows the problem I am running into.

#2

Updated by Patrick Talbot almost 14 years ago

Thanks for the update Nicholas.
I will have a look as soon as possible.

#3

Updated by Patrick Talbot almost 14 years ago

  • Status changed from New to In Progress
#4

Updated by Patrick Talbot almost 14 years ago

  • % Done changed from 0 to 60

I have fixed a few things, and your charts samples are working for me now.

Basically, there were a few typo in the min/max values which were not all consistent, so not all the values were correctly taken into account - the max value more than anything... so no proper scaling was done.
Then the markers were not taking into account any of the scaling... this is fixed too.
Still, you will need to take care that your min/max values (for x and y) will be consistent if you want the markers to be scaled accurately. For example, if xMax is 100 and you have a value of 105, the data will be scaled accordingly and will take into account 105 as the max value, but the markers are scaled individually and will still rely on the xMax initial value (ie. 100 in this example), which will lead to incorrect placing of the markers.

I still need to adapt the code for rangeMarkers, and bar charts PlotMarkers.
And also try to fix the grid to use the correct range (right now all of these are still in the 0-100 range, no matter what).

Some issues too with the size of the URL generated because of the scaling (which is too precise for GoogleCharts because the URL with that amount of data goes beyond the 2048 bytes limit set in GoogleCharts) - meaning that these kind of charts with lots of data and scaling will only be available with the Eastwood engine.

Also you will have to take care of the label positions, and make sure that they are in the range of minRange/maxRange of the axis, otherwise it will error (an exception will be thrown and you will see it in servoy_log.txt).

I will go back to this asap and commit the changes to a new version, and send you back your samples so that you will better understand how to tweak the parameters. Stay tuned! ;)

#5

Updated by Patrick Talbot almost 14 years ago

  • % Done changed from 60 to 80

RangeMarkers scaling fixed too.
Plot markers for bar charts don't need that, they are based on bar values anyway, which will already be scaled.

Grid is tougher. I will see how I can adapt in Eastwood at least.

#6

Updated by Patrick Talbot almost 14 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 80 to 100

There are grid offset (x and y) which are now part of the Google Charts API, however, the charts4J API that I use to generate the URL is not up to date (and there's not much activity on the site). So I will probably have to patch the charts4J API to offset the grid x/y according to scaling which might takes longer than expected.

In the mean time I close this bug and will open another one for grid offset, so that you will be able to use a new build, which should be v1.2.1
I will upload an update this evening.

Also available in: Atom PDF