ibrahimsaputra / achartengine

Automatically exported from code.google.com/p/achartengine
0 stars 0 forks source link

Patch for the Time Axis X grid values #151

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
This patch changes the X axis on the Time chart to be easier to read/use, by 
aligning the grid with "normalised" values (day, 12 hours, 6 hours etc).

Original issue reported on code.google.com by artiom....@gmail.com on 6 Nov 2011 at 6:37

Attachments:

GoogleCodeExporter commented 9 years ago
Please change the type from Defect to Patch =/

Original comment by artiom....@gmail.com on 6 Nov 2011 at 6:38

GoogleCodeExporter commented 9 years ago
I've added some screenshots to demonstrate the change.
In this case, I've also changed the date format, depending on the zoom levels, 
but even if it used the standard format - it's still much much more useful, 
than creating the grid by splitting the "long" date range mathematically :)

The patch itself is non-breaking (it will use the current implementation by 
default). I guess a new method in the ChartFactory class would be useful to 
enable this functionality (unless of course you want to make it work like this 
by default, which I think would be a great idea) :)

Original comment by artiom....@gmail.com on 6 Nov 2011 at 7:07

Attachments:

GoogleCodeExporter commented 9 years ago
SVN rev. r320 includes this patch. Thanks!

Original comment by dandrome...@gmail.com on 10 Dec 2011 at 2:57

GoogleCodeExporter commented 9 years ago
Please check this bug again, I see it in current achartengine-1.0.0.jar .

See attach image.

Inputed data:

 List<Date[]> dates = new ArrayList<Date[]>();
 List<double[]> values = new ArrayList<double[]>();
 int length = titles.length;
 for (int i = 0; i < length; i++) {
      dates.add(new Date[12]);
      dates.get(i)[0] = new Date(108, 9, 1,22,35,36);
      dates.get(i)[1] = new Date(108, 9, 1,22,35,37);
      dates.get(i)[2] = new Date(108, 9, 1,22,35,38);
      dates.get(i)[3] = new Date(108, 9, 1,22,35,39);
      dates.get(i)[4] = new Date(108, 9, 1,22,35,40);
      dates.get(i)[5] = new Date(108, 9, 1,22,35,41);
      dates.get(i)[6] = new Date(108, 9, 1,22,35,42);
      dates.get(i)[7] = new Date(108, 9, 1,22,35,43);
      dates.get(i)[8] = new Date(108, 9, 1,22,35,44);
      dates.get(i)[9] = new Date(108, 9, 1,22,35,45);
      dates.get(i)[10] = new Date(108, 9, 1,22,35,46);
      dates.get(i)[11] = new Date(108, 9, 1,22,35,47);
    }
 values.add(new double[] { 142, 123, 142, 152, 149, 122, 110, 120, 125, 155, 146, 150 });

Original comment by sergey.public on 22 Sep 2012 at 10:17

Attachments:

GoogleCodeExporter commented 9 years ago
How Can i integret it to the achartengine.jar ?

Original comment by simon0...@gmail.com on 25 Apr 2013 at 4:14

GoogleCodeExporter commented 9 years ago
#5 you can't integrate it in the jar file. You have to download the source code 
of AChartLibrary, apply the patch and recompile it.

Also, as dandrome...@gmail.com mentioned in #3 - it's already been applied in 
the source code. So no need to do anything, just take the latest source and 
compile it.

Original comment by artiom....@gmail.com on 25 Apr 2013 at 4:36

GoogleCodeExporter commented 9 years ago
Like  sergey.public said, it still bug

Original comment by simon0...@gmail.com on 25 Apr 2013 at 9:48

GoogleCodeExporter commented 9 years ago
You can download the nightly builds here: 
https://repository-achartengine.forge.cloudbees.com/snapshot/org/achartengine/ac
hartengine/1.1.0/

No need to rebuild it from source yourselves.

Original comment by dandrome...@gmail.com on 2 May 2013 at 6:00