Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/exports/DiagramGenerator.java @ 9283:55e2155ab52d
Introduced new option 'tick-units' for axes. Configured the count Axis to only allow for integer ticks.
author | gernotbelger |
---|---|
date | Fri, 20 Jul 2018 15:24:05 +0200 |
parents | 1cc7653ca84f |
children | 7c7f73e5e01e |
comparison
equal
deleted
inserted
replaced
9282:7efb27005d0d | 9283:55e2155ab52d |
---|---|
29 import org.dive4elements.artifactdatabase.state.ArtifactAndFacet; | 29 import org.dive4elements.artifactdatabase.state.ArtifactAndFacet; |
30 import org.dive4elements.artifactdatabase.state.Facet; | 30 import org.dive4elements.artifactdatabase.state.Facet; |
31 import org.dive4elements.artifacts.CallContext; | 31 import org.dive4elements.artifacts.CallContext; |
32 import org.dive4elements.river.artifacts.D4EArtifact; | 32 import org.dive4elements.river.artifacts.D4EArtifact; |
33 import org.dive4elements.river.exports.DiagramAttributes.AxisAttributes; | 33 import org.dive4elements.river.exports.DiagramAttributes.AxisAttributes; |
34 import org.dive4elements.river.exports.DiagramAttributes.AxisAttributes.TickUnits; | |
34 import org.dive4elements.river.exports.process.Processor; | 35 import org.dive4elements.river.exports.process.Processor; |
35 import org.dive4elements.river.jfree.AxisDataset; | 36 import org.dive4elements.river.jfree.AxisDataset; |
36 import org.dive4elements.river.jfree.Bounds; | 37 import org.dive4elements.river.jfree.Bounds; |
37 import org.dive4elements.river.jfree.DoubleBounds; | 38 import org.dive4elements.river.jfree.DoubleBounds; |
38 import org.dive4elements.river.jfree.RiverAnnotation; | 39 import org.dive4elements.river.jfree.RiverAnnotation; |
1292 axis.setAutoRangeIncludesZero(true); | 1293 axis.setAutoRangeIncludesZero(true); |
1293 } | 1294 } |
1294 | 1295 |
1295 axis.setLowerMargin(axisAttributes.getLowerMargin()); | 1296 axis.setLowerMargin(axisAttributes.getLowerMargin()); |
1296 axis.setUpperMargin(axisAttributes.getUpperMargin()); | 1297 axis.setUpperMargin(axisAttributes.getUpperMargin()); |
1297 | 1298 |
1299 TickUnits tickUnits = axisAttributes.getTickUnits(); | |
1300 if( tickUnits != TickUnits.standard ) | |
1301 axis.setStandardTickUnits(tickUnits.createTickUnits()); | |
1302 | |
1298 return axis; | 1303 return axis; |
1299 } | 1304 } |
1300 | 1305 |
1301 /** | 1306 /** |
1302 * @return the subtitle parts | 1307 * @return the subtitle parts |