wpu.nu

Skillnad mellan versioner av "Mall:Isotopgraf"

Från wpu.nu

m
 
(16 mellanliggande versioner av samma användare visas inte)
Rad 1: Rad 1:
 
<includeonly>{{#tag:graph|</includeonly><noinclude>{{:{{FULLPAGENAME}} }}<br>'''&lt;graph>'''{{#tag:syntaxhighlight|</noinclude>{
 
<includeonly>{{#tag:graph|</includeonly><noinclude>{{:{{FULLPAGENAME}} }}<br>'''&lt;graph>'''{{#tag:syntaxhighlight|</noinclude>{
   "width": 800,
+
   "width": 600,
   "height": 800,
+
   "height": 600,
   "padding": {"top": 30, "left": 60, "bottom": 60, "right": 30},
+
   "padding": {"top": 0, "left": 60, "bottom": 60, "right": 0},
  
 
   "data": [
 
   "data": [
 
     {
 
     {
 
       "name": "table",
 
       "name": "table",
       "url": "https://wpu.nu/wiki/Special:Fr%C3%A5ga/format%3Dcsv/limit%3D100000/link%3Dall/headers%3Dshow/searchlabel%3DCSV/class%3Dsortable-20wikitable-20smwtable/sep%3D,-20/sort%3D/order%3Dasc/offset%3D0/-5B-5BKategori:Kulor-5D-5D-20-5B-5BHar-20Pb208-20Pb206::%2B-5D-5D/-3F%3Dnamn/-3FUr-20Ask%3Dask/-3FHar-20Pb204-20Pb206%3D204-5F206/-3FHar-20Pb207-20Pb206%3D207-5F206/-3FHar-20Pb208-20Pb206%3D208-5F206/-3FHar-20Felmarginal-20Pb204-20Pb206%3Derr4/-3FHar-20Felmarginal-20Pb207-20Pb206%3Derr7/-3FHar-20Felmarginal-20Pb208-20Pb206%3Derr8/mainlabel%3D/prettyprint%3Dtrue/unescape%3Dtrue",
+
       "url": "https://wpu.nu/wiki/Special:Fr%C3%A5ga/format%3Dcsv/limit%3D100000/link%3Dall/headers%3Dshow/searchlabel%3DCSV/class%3Dsortable-20wikitable-20smwtable/sep%3D,-20/sort%3D/order%3Dasc/offset%3D0/-5B-5BKategori:Kulor-5D-5D-20-5B-5BHar-20Pb208-20Pb206::%2B-5D-5D/-3F%3Dnamn/-3FUr-20Ask%3Dask/-3FHar-20Pb204-20Pb206%3D204-5F206/-3FHar-20Pb207-20Pb206%3D207-5F206/-3FHar-20Pb208-20Pb206%3D208-5F206/-3FHar-20Felmarginal-20Pb204-20Pb206%3Derr-5F204/-3FHar-20Felmarginal-20Pb207-20Pb206%3Derr-5F207/-3FHar-20Felmarginal-20Pb208-20Pb206%3Derr-5F208/mainlabel%3D/prettyprint%3Dtrue/unescape%3Dtrue",
 
       "format": {"type": "csv"},
 
       "format": {"type": "csv"},
 
       "transform": [
 
       "transform": [
    {"type": "formula", "field": "kortnamn", "expr": "replace(datum.namn, 'Kula ', '')"}
+
      {"type": "formula", "field": "kortnamn", "expr": "replace(datum.namn, 'Kula ', '')"}
 
       ]
 
       ]
 
     }
 
     }
Rad 33: Rad 33:
 
   "scales": [
 
   "scales": [
 
     {  
 
     {  
       "name": "scale_46",  
+
       "name": "scale_204_206",  
 
       "range": "width",
 
       "range": "width",
 
       "zero": false,
 
       "zero": false,
         "domain": [0.050, 0.055]
+
         "domain": [0.0520, 0.0535]
 
     },
 
     },
 
     {  
 
     {  
       "name": "scale_86",  
+
       "name": "scale_208_206",  
 
       "range": "height",
 
       "range": "height",
 
       "zero": false,
 
       "zero": false,
         "domain": [2.0, 2.03]
+
         "domain": [2.04, 2.0]
 
     },
 
     },
 
     {  
 
     {  
       "name": "scale_76",  
+
       "name": "scale_207_206",  
 
       "range": "width",
 
       "range": "width",
 
       "zero": false,
 
       "zero": false,
Rad 51: Rad 51:
 
     },
 
     },
 
     {  
 
     {  
       "name": "err4",  
+
       "name": "err_204",  
       "range": [0, 36000],
+
       "range": [0, 2000],
 
       "zero": true,
 
       "zero": true,
 
         "domain":  
 
         "domain":  
 
         {  
 
         {  
 
             "data": "table",  
 
             "data": "table",  
             "field": "err4"
+
             "field": "err_204"
 
         }  
 
         }  
 
     },
 
     },
 
     {  
 
     {  
       "name": "err7",  
+
       "name": "err_207",  
 
       "range": [0, 2000],
 
       "range": [0, 2000],
 
       "zero": true,
 
       "zero": true,
Rad 67: Rad 67:
 
         {  
 
         {  
 
             "data": "table",  
 
             "data": "table",  
             "field": "err7"
+
             "field": "err_207"
 
         }  
 
         }  
 
     },
 
     },
 
     {  
 
     {  
       "name": "err8",  
+
       "name": "err_208",  
       "range": [0, 36000],
+
       "range": [0, 2000],
 
       "zero": true,
 
       "zero": true,
 
         "domain":  
 
         "domain":  
 
         {  
 
         {  
 
             "data": "table",  
 
             "data": "table",  
             "field": "err8"
+
             "field": "err_208"
 
         }  
 
         }  
 
     },
 
     },
Rad 92: Rad 92:
 
   ],
 
   ],
 
   "axes": [
 
   "axes": [
     { "type": "x", "scale": "scale_76", "title": "Pb207/Pb206" },
+
     { "type": "x", "scale": "scale_{{{1}}}_206", "title": "Pb{{{1}}}/Pb206" },
     { "type": "y", "scale": "scale_86", "title": "Pb208/Pb206" }
+
     { "type": "y", "scale": "scale_{{{2}}}_206", "title": "Pb{{{2}}}/Pb206" }
 
   ],
 
   ],
  
Rad 103: Rad 103:
 
       "properties": {
 
       "properties": {
 
         "enter": {
 
         "enter": {
           "xc": {"scale": "scale_76", "field": "207_206"},
+
           "xc": {"scale": "scale_{{{1}}}_206", "field": "{{{1}}}_206"},
           "yc": {"scale": "scale_86", "field": "208_206"},
+
           "yc": {"scale": "scale_{{{2}}}_206", "field": "{{{2}}}_206"},
           "size": {"scale": "err7", "field": "err7"},
+
           "size": {"scale": "err_{{{1}}}", "field": "err_{{{1}}}"},
 
           "fill": {"scale": "box", "field": "ask"},
 
           "fill": {"scale": "box", "field": "ask"},
 
           "fillOpacity": {"value": 0.5},
 
           "fillOpacity": {"value": 0.5},
Rad 125: Rad 125:
 
       "properties": {
 
       "properties": {
 
         "enter": {
 
         "enter": {
           "xc": {"scale": "scale_76", "field": "207_206"},
+
           "xc": {"scale": "scale_{{{1}}}_206", "field": "{{{1}}}_206"},
           "yc": {"scale": "scale_86", "field": "208_206"},
+
           "yc": {"scale": "scale_{{{2}}}_206", "field": "{{{2}}}_206"},
 
           "text": {"field": "kortnamn"},
 
           "text": {"field": "kortnamn"},
 
           "fontSize": {"value": 14},
 
           "fontSize": {"value": 14},
Rad 138: Rad 138:
 
   ],
 
   ],
 
   "legends": [
 
   "legends": [
  {
+
    {
  "title": "Ask",
+
      "title": "Ask",
  "fill": "box",
+
      "fill": "box",
  "orient": "left",
+
      "orient": "right",
  "offset": -300,
+
      "offset": -120,
  "size": {"value": 30000}
+
      "size": {"value": 30000}
  }
+
    }
 
   ]
 
   ]
 
}<includeonly>}}</includeonly><noinclude>|lang=javascript}}'''&lt;/graph>'''</noinclude>
 
}<includeonly>}}</includeonly><noinclude>|lang=javascript}}'''&lt;/graph>'''</noinclude>

Nuvarande version från 24 september 2021 kl. 21.53


<graph><syntaxhighlight lang="javascript">{

 "width": 600,
 "height": 600,
 "padding": {"top": 0, "left": 60, "bottom": 60, "right": 0},
 "data": [
   {
     "name": "table",
     "url": "https://wpu.nu/wiki/Special:Fr%C3%A5ga/format%3Dcsv/limit%3D100000/link%3Dall/headers%3Dshow/searchlabel%3DCSV/class%3Dsortable-20wikitable-20smwtable/sep%3D,-20/sort%3D/order%3Dasc/offset%3D0/-5B-5BKategori:Kulor-5D-5D-20-5B-5BHar-20Pb208-20Pb206::%2B-5D-5D/-3F%3Dnamn/-3FUr-20Ask%3Dask/-3FHar-20Pb204-20Pb206%3D204-5F206/-3FHar-20Pb207-20Pb206%3D207-5F206/-3FHar-20Pb208-20Pb206%3D208-5F206/-3FHar-20Felmarginal-20Pb204-20Pb206%3Derr-5F204/-3FHar-20Felmarginal-20Pb207-20Pb206%3Derr-5F207/-3FHar-20Felmarginal-20Pb208-20Pb206%3Derr-5F208/mainlabel%3D/prettyprint%3Dtrue/unescape%3Dtrue",
     "format": {"type": "csv"},
     "transform": [
     {"type": "formula", "field": "kortnamn", "expr": "replace(datum.namn, 'Kula ', )"}
     ]
   }
 ],
 "signals": [
   {
     "name": "tooltip",
     "init": {},
     "streams": [
       {"type": "rect:mouseover", "expr": "datum"},
       {"type": "rect:mouseout", "expr": "{}"}
     ]
   }
 ],
 "predicates": [
   {
     "name": "ifTooltip", "type": "==", 
     "operands": [{"signal": "tooltip._id"}, {"arg": "id"}]
   }
 ],
 "scales": [
   { 
     "name": "scale_204_206", 
     "range": "width",
     "zero": false,
       "domain": [0.0520, 0.0535]
   },
   { 
     "name": "scale_208_206", 
     "range": "height",
     "zero": false,
       "domain": [2.04, 2.0]
   },
   { 
     "name": "scale_207_206", 
     "range": "width",
     "zero": false,
       "domain": [0.8125, 0.8235]
   },
   { 
     "name": "err_204", 
     "range": [0, 2000],
     "zero": true,
       "domain": 
       { 
           "data": "table", 
           "field": "err_204"
       } 
   },
   { 
     "name": "err_207", 
     "range": [0, 2000],
     "zero": true,
       "domain": 
       { 
           "data": "table", 
           "field": "err_207"
       } 
   },
   { 
     "name": "err_208", 
     "range": [0, 2000],
     "zero": true,
       "domain": 
       { 
           "data": "table", 
           "field": "err_208"
       } 
   },
   { 
   "name": "box", 
   "type": "ordinal",
   "range": "category20b",
       "domain": 
       { 
           "data": "table", 
           "field": "ask"
       } 
   }
 ],
 "axes": [
   { "type": "x", "scale": "scale_{{{1}}}_206", "title": "Pb{{{1}}}/Pb206" },
   { "type": "y", "scale": "scale_{{{2}}}_206", "title": "Pb{{{2}}}/Pb206" }
 ],
 "marks": [
   {
     "name": "points",
     "type": "symbol",
     "from": {"data":"table"},
     "properties": {
       "enter": {
         "xc": {"scale": "scale_{{{1}}}_206", "field": "{{{1}}}_206"},
         "yc": {"scale": "scale_{{{2}}}_206", "field": "{{{2}}}_206"},
         "size": {"scale": "err_{{{1}}}", "field": "err_{{{1}}}"},
         "fill": {"scale": "box", "field": "ask"},
         "fillOpacity": {"value": 0.5},
         "stroke": {"scale": "box", "field": "ask"},
         "strokeOpacity": {"value": 1},
         "strokeWidth": {"value": 3}
       },
       "hover" : {
         "fillOpacity": {"value": 1}
       },
       "update" : {
         "fillOpacity": {"value": 0.5}
       }
     }
   },
   {
     "type": "text",
     "from": {"data": "table"},
     "properties": {
       "enter": {
         "xc": {"scale": "scale_{{{1}}}_206", "field": "{{{1}}}_206"},
         "yc": {"scale": "scale_{{{2}}}_206", "field": "{{{2}}}_206"},
         "text": {"field": "kortnamn"},
         "fontSize": {"value": 14},
         "fill": {"value": "#000"},
         "fontWeight":{"value": "bold"},
         "align": {"value": "center"},
         "baseline": {"value": "middle"}
       }
     }
   }
 ],
 "legends": [
   {
     "title": "Ask",
     "fill": "box",
     "orient": "right",
     "offset": -120,
     "size": {"value": 30000}
   }
 ]

}</syntaxhighlight></graph>