From 48aa81ceee984d1ce0f133a0d517d69dfd793199 Mon Sep 17 00:00:00 2001 From: miettinen Date: Wed, 12 Jun 2013 06:12:17 +0000 Subject: [PATCH] Time as the default x-axis in line and sensitivity charts (refs #4323). git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@27527 ac1ea38d-2e2b-0410-8846-a27921b304fc --- .../handlers/newComponents/NewSensitivityChartHandler.java | 4 +++- .../ui/handlers/newComponents/NewXYLineChartHandler.java | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/newComponents/NewSensitivityChartHandler.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/newComponents/NewSensitivityChartHandler.java index 44ba5e48..013c5602 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/newComponents/NewSensitivityChartHandler.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/newComponents/NewSensitivityChartHandler.java @@ -74,7 +74,9 @@ public class NewSensitivityChartHandler extends AbstractHandler { l0.PartOf, jfreechart); Resource domainAxis = GraphUtils.create2(g, jfree.NumberAxis, - l0.HasName, "NumberAxis" + UUID.randomUUID().toString()); + l0.HasName, "NumberAxis" + UUID.randomUUID().toString(), + jfree.variableRVI, "/time", + l0.HasLabel, "Time"); Resource rangeAxis = GraphUtils.create2(g, jfree.NumberAxis, l0.HasName, "NumberAxis" + UUID.randomUUID().toString(), l0.HasLabel, ""); diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/newComponents/NewXYLineChartHandler.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/newComponents/NewXYLineChartHandler.java index bb872cf2..2f06ce81 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/newComponents/NewXYLineChartHandler.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/newComponents/NewXYLineChartHandler.java @@ -37,6 +37,7 @@ import org.simantics.utils.ui.AdaptionUtils; /** * Handler for creating a new XYLineChart in model browser * @author Teemu Lempinen + * @author Tuomas Miettinen * */ public class NewXYLineChartHandler extends AbstractHandler { @@ -76,7 +77,9 @@ public class NewXYLineChartHandler extends AbstractHandler { l0.PartOf, jfreechart); Resource domainAxis = GraphUtils.create2(g, jfree.NumberAxis, - l0.HasName, "NumberAxis" + UUID.randomUUID().toString()); + l0.HasName, "NumberAxis" + UUID.randomUUID().toString(), + jfree.variableRVI, "/time", + l0.HasLabel, "Time"); Resource rangeAxis = GraphUtils.create2(g, jfree.NumberAxis, l0.HasName, "NumberAxis" + UUID.randomUUID().toString(), l0.HasLabel, "Y-axis"); -- 2.47.1