0 Replies Latest reply: Jun 16, 2011 8:47 AM by 869351 RSS

    Align Chart within Container

      Hey everybody,

      I just experimented with JavaFX a bit and encountered a problem I can't solve with my beginner skills ;)

      I tried to integrate my PieChart in a TabPanel I downloaded and customized. this is how it looks like:
      var KarteTab:TabPanel = TabPanel {
        title: "Karte"
            HBox {
                width: 700
                height: 680
                translateX: 0
                translateY: 20
           content: [
                  VBox {
                      width: 250
                      translateX: 0
                      translateY: 20
                      layoutX: 0
                      layoutY: 0
                      content: [PoPPieChart, Button {text: "bla"}]
      The Tabs work like a stack.
      The PieChart itself looks like this:
      var PoPPieChart:PoPPieChart = PoPPieChart {
          title: "Bevölkerung"
          scaleX: 0.5
          scaleY: 0.5
          translateX: 0
          translateY: 0
          layoutX: 0
          layoutY: 0
          width: 100
          height: 100
          PieChart.Data {label: "Value 1" value: 34}
          .Data {label  : "Value 2" value: 66 }
      I expected the Chart to appear in the left upper corner, but it looks like this:

      First guess: The PieChart object is far bigger than the Chart itself with an "invisible" background covering much area. But, in case I am right, how may I resize it?

      Thanks in advance!