Aktionen

Benutzer

Bearbeiten von „Felix Englisch

Warnung: Du bist nicht angemeldet. Deine IP-Adresse wird bei Bearbeitungen öffentlich sichtbar. Melde dich an oder erstelle ein Benutzerkonto, damit Bearbeitungen deinem Benutzernamen zugeordnet werden. Mehr Informationen in unserer Anleitung.

Die Bearbeitung kann rückgängig gemacht werden. Bitte prüfe den Vergleich unten, um sicherzustellen, dass du dies tun möchtest, und veröffentliche dann unten deine Änderungen, um die Bearbeitung rückgängig zu machen.

Aktuelle Version Dein Text
Zeile 89: Zeile 89:
</graph>
</graph>
Wahl zum Stadtrat der Hansestadt Lüneburg 2021 (Wahlbeteiligung 56,2 %)</div>
Wahl zum Stadtrat der Hansestadt Lüneburg 2021 (Wahlbeteiligung 56,2 %)</div>
== noch eins ==
<graph>{
  "$schema": "https://vega.github.io/schema/vega-lite/v5.json",
  "description": "A simple pie chart with labels.",
  "data": {
    "values": [
      {"category": "a", "value": 4},
      {"category": "b", "value": 6},
      {"category": "c", "value": 10},
      {"category": "d", "value": 3},
      {"category": "e", "value": 7},
      {"category": "f", "value": 8}
    ]
  },
  "encoding": {
    "theta": {"field": "value", "type": "quantitative", "stack": true},
    "color": {"field": "category", "type": "nominal", "legend": null}
  },
  "layer": [{
    "mark": {"type": "arc", "outerRadius": 80}
  }, {
    "mark": {"type": "text", "radius": 90},
    "encoding": {
      "text": {"field": "category", "type": "nominal"}
    }
  }]
}
</graph>


== Zweites Diagramm ==
== Zweites Diagramm ==
Zeile 416: Zeile 386:


{
{
  //
  // ATTENTION: This code is maintained at https://www.mediawiki.org/wiki/Template:Graph:Pie_from_row
  //            Please do not modify it anywhere else, as it may get copied and override your changes.
  //            Suggestions can be made at https://www.mediawiki.org/wiki/Template_talk:Graph:Pie_from_row
  //
  // Template translation is in https://commons.wikimedia.org/wiki/Data:Original/Template:Graphs.tab
  //
   "version": 2,
   "version": 2,
   "width": 100,
   "width": 100, "height": 100, "padding": "auto",
  "height": 100,
"legends": [{"title": "Legend","fill": "color"}],
   "data": [
   "data": [{
    {
       "name": "table",
       "name": "table",
       "values": [12,23,47,6,52,19],
       "url": "tabular:///Bea.gov/GDP by state.tab",
       "transform": [{"type": "pie","field": "data"}]
      "format": {"type": "json", "property": "data"},
     }
       "transform": [
   ],
 
   "scales": [
        {"type": "fold", "fields": []},
    {
        {"type": "pie", "field": "value"}
       "name": "r",
      ]
       "type": "sqrt",
  },
       "domain": {"data": "table","field": "data"},
  {
      "range": [100,100]
     "name": "labels",
    }
    "url": "tabular:///Bea.gov/GDP by state.tab",
  ],
    "format": {"type": "json", "property": "fields"}
   }],
   "scales": [{
       "name": "color",
       "type": "ordinal",
      "range": "category10",
       "domain": {"data": "table", "field": "key"},
  }],
   "marks": [
   "marks": [
     {
     {
       "type": "arc",
       "type": "arc",
       "from": {"data": "table"},
       "from": { "data": "table" },
       "properties": {
       "properties": {
         "enter": {
         "enter": {
           "x": {"field": {"group": "width"},"mult": 0.5},
           "fill": {"field": "key", "scale": "color"},
           "y": {"field": {"group": "height"},"mult": 0.5},
           "stroke": {"value": "white"},
           "startAngle": {"field": "layout_start"},
           "startAngle": {"field": "layout_start"},
           "endAngle": {"field": "layout_end"},
           "endAngle": {"field": "layout_end"},
          "innerRadius": {"value": 20},
           "outerRadius": {"value": 100 },
           "outerRadius": {"scale": "r","field": "data"},
         }
          "stroke": {"value": "#fff"}
        },
        "update": {"fill": {"value": "#ccc"} },
         "hover": {"fill": {"value": "pink"} }
       }
       }
     },
     },
     {
     {
      // This mark draws labels around the pie chart after the pie chart has been drawn
       "type": "text",
       "type": "text",
       "from": {"data": "table"},
      // Before drawing, we need to perform a number of calculations to figure out the exact location and orientation of the text
       "from": {
        "data": "table",
        "transform": [
          // For each data point (datum), each of these transformations will be ran in order.
          // Formula transformation evaluates the expression and assigns result to the datapoint
          // Size of the pie slice, in degrees:  sliceSize = (end - start) * 180 / Pi
          { "type": "formula", "field": "sliceSize", "expr": "(datum.layout_end - datum.layout_start)*180/PI" },
          // Draw text only if the slice of the arc is more than 2 degrees to avoid overcrowding
          { "type": "filter", "test": "datum.sliceSize > 9" },
          // Format percentage as a string
          { "type": "formula", "field": "prcStr", "expr": "format('.0%',datum.sliceSize/360)" },
          { "type": "formula", "field": "title", "expr": "datum.key+' '+datum.prcStr" },
          // Determine the side of the pie chart we are on - left or right.
          { "type": "formula", "field": "invert", "expr": "datum.layout_mid*180/PI < 180 ? 1 : -1" },
          // If on the left, the text should be right-aligned (go from the rim inward)
          { "type": "formula", "field": "align", "expr": "datum.invert < 0 ? 'left' : 'right'" },
          // At what angle should the text be drawn relative to the point on the circle
          { "type": "formula", "field": "angle", "expr": "(datum.layout_mid*180/PI)-90*datum.invert" },
          // Make font smaller for smaller pie slices
          { "type": "formula", "field": "fontSize", "expr": "datum.sliceSize > 20 ? 15 : (datum.sliceSize > 13 ? 12 : 9)" },
          // Make font bold for largest pie slices
          { "type": "formula", "field": "fontWeight", "expr": "datum.sliceSize > 15 ? 'bold' : 'normal'" }
        ]
      },
       "properties": {
       "properties": {
         "enter": {
         "enter": {
           "x": {"field": {"group": "width"},"mult": 0.5},
           // Use the fields calculated in the transformation to draw category names
          "y": {"field": {"group": "height"},"mult": 0.5},
          "radius": {"scale": "r","field": "data","offset": 8},
          "theta": {"field": "layout_mid"},
          "fill": {"value": "#000"},
           "align": {"value": "center"},
           "align": {"value": "center"},
          "angle": {"field": "angle"},
           "baseline": {"value": "middle"},
           "baseline": {"value": "middle"},
           "text": {"field": "data"}
          "fill": {"value": "black"},
          "fontSize": {"field": "fontSize"},
          "fontWeight": {"field": "fontWeight"},
          "radius": {"value": 100, "offset": -30},
           "text": {"field": "title"},
          "theta": {"field": "layout_mid"}
         }
         }
       }
       }
     }
     }
   ]
   ]
}
}


</graph>
</graph>

Bitte beachte, dass alle Beiträge zu Lünepedia von anderen Mitwirkenden bearbeitet, geändert oder gelöscht werden können. Reiche hier keine Texte ein, falls du nicht willst, dass diese ohne Einschränkung geändert werden können.

Du bestätigst hiermit auch, dass du diese Texte selbst geschrieben hast oder diese von einer gemeinfreien Quelle kopiert hast (weitere Einzelheiten unter Lünepedia:Urheberrechte). ÜBERTRAGE OHNE GENEHMIGUNG KEINE URHEBERRECHTLICH GESCHÜTZTEN INHALTE!

Abbrechen Bearbeitungshilfe (wird in einem neuen Fenster geöffnet)

Die folgende Vorlage wird auf dieser Seite verwendet:

Diese Seite ist in einer versteckten Kategorie enthalten:

Cookies helfen uns bei der Bereitstellung von Lünepedia. Durch die Nutzung von Lünepedia erklärst du dich damit einverstanden, dass wir Cookies speichern.