comparison gnv-artifacts/ChangeLog @ 450:20a480753ff9

Render labels in vertical cross section charts. gnv-artifacts/trunk@498 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Mon, 04 Jan 2010 02:49:42 +0000
parents c7ca2fce041f
children bc5901bb4525
comparison
equal deleted inserted replaced
449:c7ca2fce041f 450:20a480753ff9
1 2010-01-04 Sascha L. Teichmann <sascha.teichmann@intevation.de>
2
3 * src/main/java/de/intevation/gnv/jfreechart/PolygonSeriesLabelGenerator.java:
4 New. Interface to generate labels for polygon series.
5
6 * src/main/java/de/intevation/gnv/jfreechart/PolygonRenderer.java:
7 Added logic to generate and render labels of polygons.
8 The implemented layout algorithm is greedy. For all
9 polygons with labels the label is placed on the center of
10 the ring, which center in terms of the indices of the vertices.
11 If the bounding box of the label intersects the bounding box
12 of a an already placed one alternative places are tried.
13 In level order positions at 1/4, 3/4, 1/8, 3/8, 5/8, 7/8 and
14 so on are evaluated for non intersections with former placed labels.
15 This terminates if a free place is found or all index positions
16 are exhausted. If no free position is found the label is omitted.
17
18 The visual result is okay but could be improved by a more clever
19 algorithm e.g. tension reduction in the graph of labels.
20
21 TODO: Improve clipping against chart borders.
22
23 * src/main/java/de/intevation/gnv/jfreechart/LevelOrderIndices.java:
24 New. Little helper class to generate the level order index
25 traversal used in the label layout. Placed in the jfreechart
26 package to keep it clean from gnv dependencies.
27
28 * src/main/java/de/intevation/gnv/jfreechart/PolygonPlot.java:
29 Added some methods to access the domain and range axis and
30 there edge position. Mainly C&P from JFreeCahrts XYPlot
31 to ease the coordinate transformation between Java2D and
32 the value spaces of the chart. Call the label generation
33 of the polygon renderer.
34
35 * src/main/java/de/intevation/gnv/chart/VerticalCrossSectionChart.java:
36 Added an implementation of PolygonSeriesLabelGenerator to
37 generate localized labels for the iso lines.
38
1 2010-01-03 Sascha L. Teichmann <sascha.teichmann@intevation.de> 39 2010-01-03 Sascha L. Teichmann <sascha.teichmann@intevation.de>
2 40
3 * src/main/java/de/intevation/gnv/chart/VerticalCrossSectionChart.java: 41 * src/main/java/de/intevation/gnv/chart/VerticalCrossSectionChart.java:
4 Only add colors to scale which are in the chart. 42 Only add colors to scale which are in the chart.
5 43

http://dive4elements.wald.intevation.org