https://de.wikipedia.org/w/index.php?action=history&feed=atom&title=Modul%3AGraph%2Fsandbox Modul:Graph/sandbox - Versionsgeschichte 2025-05-25T02:54:08Z Versionsgeschichte dieser Seite in Wikipedia MediaWiki 1.45.0-wmf.2 https://de.wikipedia.org/w/index.php?title=Modul:Graph/sandbox&diff=215633154&oldid=prev Inductiveload: add linecolor option for pie charts - default is still white 2021-09-16T13:45:52Z <p>add linecolor option for pie charts - default is still white</p> <a href="//de.wikipedia.org/w/index.php?title=Modul:Graph/sandbox&amp;diff=215633154&amp;oldid=202594784">Änderungen zeigen</a> Inductiveload https://de.wikipedia.org/w/index.php?title=Modul:Graph/sandbox&diff=202594784&oldid=prev Pietrasagh: new "nice" and "xGrid" / "yGrid" logic 2020-08-08T09:01:47Z <p>new &quot;nice&quot; and &quot;xGrid&quot; / &quot;yGrid&quot; logic</p> <table style="background-color: #fff; color: #202122;" data-mw="interface"> <col class="diff-marker" /> <col class="diff-content" /> <col class="diff-marker" /> <col class="diff-content" /> <tr class="diff-title" lang="de"> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Nächstältere Version</td> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Version vom 8. August 2020, 11:01 Uhr</td> </tr><tr> <td colspan="2" class="diff-lineno">Zeile 19:</td> <td colspan="2" class="diff-lineno">Zeile 19:</td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>-- Version History (_PLEASE UPDATE when modifying anything_):</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>-- Version History (_PLEASE UPDATE when modifying anything_):</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>-- 2020-08-08 New logic for "nice" for x axis (problem with scale when xType = "date") and grid</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>-- 2020-06-21 Serializes symbol size</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>-- 2020-06-21 Serializes symbol size</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>-- transparent symbosls (from line colour) - buggy (incorrect opacity on overlap with line)</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>-- transparent symbosls (from line colour) - buggy (incorrect opacity on overlap with line)</div></td> </tr> <tr> <td colspan="2" class="diff-lineno">Zeile 367:</td> <td colspan="2" class="diff-lineno">Zeile 368:</td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> range = "width",</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> range = "width",</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> zero = false, -- do not include zero value</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> zero = false, -- do not include zero value</div></td> </tr> <tr> <td class="diff-marker"><a class="mw-diff-movedpara-left" title="Der Absatz wurde verschoben. Klicken, um zur neuen Stelle zu springen." href="#movedpara_8_0_rhs">&#x26AB;</a></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><a name="movedpara_3_0_lhs"></a><del style="font-weight: bold; text-decoration: none;"> nice</del> = xScaleType ~= "log"<del style="font-weight: bold; text-decoration: none;">,</del> -- force round numbers for x scale, but log scale outputs a wrong "nice" scale</div></td> <td colspan="2" class="diff-empty diff-side-added"></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> domain = { data = "chart", field = "x" }</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> domain = { data = "chart", field = "x" }</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> }</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> }</div></td> </tr> <tr> <td colspan="2" class="diff-lineno">Zeile 380:</td> <td colspan="2" class="diff-lineno">Zeile 380:</td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> xscale.type = "ordinal"</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> xscale.type = "ordinal"</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> if not stacked then xscale.padding = 0.2 end -- pad each bar group</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> if not stacked then xscale.padding = 0.2 end -- pad each bar group</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> else</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> else<ins style="font-weight: bold; text-decoration: none;"> </ins></div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> if xType == "date" then xscale.type = "time"</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> if xType == "date" then </div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"> </ins>xscale.type = "time"</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> elseif xType == "string" then</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> elseif xType == "string" then</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> xscale.type = "ordinal"</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> xscale.type = "ordinal"</div></td> </tr> <tr> <td colspan="2" class="diff-lineno">Zeile 387:</td> <td colspan="2" class="diff-lineno">Zeile 388:</td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> end</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> end</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> end</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> end</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker"><a class="mw-diff-movedpara-right" title="Der Absatz wurde verschoben. Klicken, um zur alten Stelle zu springen." href="#movedpara_3_0_lhs">&#x26AB;</a></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><a name="movedpara_8_0_rhs"></a><ins style="font-weight: bold; text-decoration: none;"> if</ins> <ins style="font-weight: bold; text-decoration: none;">xType and xType ~</ins>=<ins style="font-weight: bold; text-decoration: none;"> "date" and</ins> xScaleType ~= "log" <ins style="font-weight: bold; text-decoration: none;">then xscale.nice = true end</ins> -- force round numbers for x scale, but <ins style="font-weight: bold; text-decoration: none;">"</ins>log<ins style="font-weight: bold; text-decoration: none;">" and "date"</ins> scale outputs a wrong "nice" scale</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><br /></td> <td colspan="2" class="diff-empty diff-side-added"></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> return xscale</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> return xscale</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>end</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>end</div></td> </tr> <tr> <td colspan="2" class="diff-lineno">Zeile 810:</td> <td colspan="2" class="diff-lineno">Zeile 811:</td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> title = xTitle,</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> title = xTitle,</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> format = xAxisFormat,</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> format = xAxisFormat,</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> grid = xGrid<del style="font-weight: bold; text-decoration: none;"> ~= "0"</del></div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> grid = xGrid</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> }</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> }</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> if xAxisAngle then</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> if xAxisAngle then</div></td> </tr> <tr> <td colspan="2" class="diff-lineno">Zeile 876:</td> <td colspan="2" class="diff-lineno">Zeile 877:</td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> title = yTitle,</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> title = yTitle,</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> format = yAxisFormat,</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> format = yAxisFormat,</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> grid = yGrid<del style="font-weight: bold; text-decoration: none;"> ~= "0"</del></div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> grid = yGrid</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> }</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> }</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> yAxis.properties =</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> yAxis.properties =</div></td> </tr> <tr> <td colspan="2" class="diff-lineno">Zeile 1.109:</td> <td colspan="2" class="diff-lineno">Zeile 1.110:</td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> end</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> end</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> end</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> end</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> </div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><br /></td> <td colspan="2" class="diff-empty diff-side-added"></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> -- grids</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> if xGrid then </div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> if xGrid == "0" then xGrid = false</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> elseif xGrid == 0 then xGrid = false </div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> elseif xGrid == "false" then xGrid = false </div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> elseif xGrid == "n" then xGrid = false </div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> else xGrid = true </div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> end</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> end</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> if yGrid then </div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> if yGrid == "0" then yGrid = false</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> elseif yGrid == 0 then yGrid = false </div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> elseif yGrid == "false" then yGrid = false </div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> elseif yGrid == "n" then yGrid = false </div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> else yGrid = true </div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> end</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> end</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> </div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> -- symbol marks</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> -- symbol marks</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> if showSymbols then</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> if showSymbols then</div></td> </tr> </table> Pietrasagh https://de.wikipedia.org/w/index.php?title=Modul:Graph/sandbox&diff=201371320&oldid=prev Pietrasagh: sync with de:Modul:Graph (XGrid and yGrid) 2020-06-28T07:19:25Z <p>sync with de:Modul:Graph (XGrid and yGrid)</p> <a href="//de.wikipedia.org/w/index.php?title=Modul:Graph/sandbox&amp;diff=201371320&amp;oldid=201174241">Änderungen zeigen</a> Pietrasagh https://de.wikipedia.org/w/index.php?title=Modul:Graph/sandbox&diff=201174241&oldid=prev Pietrasagh am 21. Juni 2020 um 10:46 Uhr 2020-06-21T10:46:58Z <p></p> <table style="background-color: #fff; color: #202122;" data-mw="interface"> <col class="diff-marker" /> <col class="diff-content" /> <col class="diff-marker" /> <col class="diff-content" /> <tr class="diff-title" lang="de"> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Nächstältere Version</td> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Version vom 21. Juni 2020, 12:46 Uhr</td> </tr><tr> <td colspan="2" class="diff-lineno">Zeile 798:</td> <td colspan="2" class="diff-lineno">Zeile 798:</td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> if chartType ~= "pie" then</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> if chartType ~= "pie" then</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> if xType == "integer" then xAxisFormat = "d" end</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> if xType == "integer" then xAxisFormat = "d" end</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> if not xAxisFormat then xAxisFormat = "g" end</div></td> <td colspan="2" class="diff-empty diff-side-added"></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> xAxis =</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> xAxis =</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> {</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> {</div></td> </tr> </table> Pietrasagh https://de.wikipedia.org/w/index.php?title=Modul:Graph/sandbox&diff=200721204&oldid=prev Jura1: modifs. per Wikipedia_Diskussion:Lua/Modul/Graph#Compatibility_with_Listeria 2020-06-07T13:54:01Z <p>modifs. per <a href="/wiki/Wikipedia_Diskussion:Lua/Modul/Graph#Compatibility_with_Listeria" title="Wikipedia Diskussion:Lua/Modul/Graph">Wikipedia_Diskussion:Lua/Modul/Graph#Compatibility_with_Listeria</a></p> <table style="background-color: #fff; color: #202122;" data-mw="interface"> <col class="diff-marker" /> <col class="diff-content" /> <col class="diff-marker" /> <col class="diff-content" /> <tr class="diff-title" lang="de"> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Nächstältere Version</td> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Version vom 7. Juni 2020, 15:54 Uhr</td> </tr><tr> <td colspan="2" class="diff-lineno">Zeile 18:</td> <td colspan="2" class="diff-lineno">Zeile 18:</td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>-- - second axis (deep rebuild required - assignment of series to one of two axies) </div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>-- - second axis (deep rebuild required - assignment of series to one of two axies) </div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>-- 2020-06-07 Allow lowercase variables for use with [[Template:Wikidata list]]</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>-- 2020-05-10 Default axis format "g" not "d" </div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>-- 2020-05-10 Default axis format "g" not "d" </div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>-- 2020-05-10 Serializes symbol size</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>-- 2020-05-10 Serializes symbol size</div></td> </tr> <tr> <td colspan="2" class="diff-lineno">Zeile 110:</td> <td colspan="2" class="diff-lineno">Zeile 111:</td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> -- defaultValue for geographic objects without data</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> -- defaultValue for geographic objects without data</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> local defaultValue = frame.args.defaultValue</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> local defaultValue = frame.args.defaultValue</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> local scaleType = frame.args.scaleType or "linear"</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> local scaleType = frame.args.scaleType<ins style="font-weight: bold; text-decoration: none;"> or frame.args.scaletype</ins> or "linear"</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> -- minimaler Wertebereich (nur für numerische Daten)</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> -- minimaler Wertebereich (nur für numerische Daten)</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> local domainMin = tonumber(frame.args.domainMin)</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> local domainMin = tonumber(frame.args.domainMin)</div></td> </tr> <tr> <td colspan="2" class="diff-lineno">Zeile 116:</td> <td colspan="2" class="diff-lineno">Zeile 117:</td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> local domainMax = tonumber(frame.args.domainMax)</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> local domainMax = tonumber(frame.args.domainMax)</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> -- Farbwerte der Farbskala (nur für numerische Daten)</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> -- Farbwerte der Farbskala (nur für numerische Daten)</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> local colorScale = frame.args.colorScale or "category10"</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> local colorScale = frame.args.colorScale<ins style="font-weight: bold; text-decoration: none;"> or frame.args.colorscale</ins> or "category10"</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> -- show legend</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> -- show legend</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> local legend = frame.args.legend</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> local legend = frame.args.legend</div></td> </tr> <tr> <td colspan="2" class="diff-lineno">Zeile 952:</td> <td colspan="2" class="diff-lineno">Zeile 953:</td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> if linewidthsString then linewidths = numericArray(linewidthsString) end</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> if linewidthsString then linewidths = numericArray(linewidthsString) end</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> -- x and y axis caption</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> -- x and y axis caption</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> local xTitle = frame.args.xAxisTitle</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> local xTitle = frame.args.xAxisTitle<ins style="font-weight: bold; text-decoration: none;"> or frame.args.xaxistitle</ins></div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> local yTitle = frame.args.yAxisTitle</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> local yTitle = frame.args.yAxisTitle<ins style="font-weight: bold; text-decoration: none;"> or frame.args.yaxistitle</ins></div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> -- x and y value types</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> -- x and y value types</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> local xType = frame.args.xType</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> local xType = frame.args.xType<ins style="font-weight: bold; text-decoration: none;"> or frame.args.xtype</ins></div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> local yType = frame.args.yType</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> local yType = frame.args.yType<ins style="font-weight: bold; text-decoration: none;"> or frame.args.ytype</ins></div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> -- override x and y axis minimum and maximum</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> -- override x and y axis minimum and maximum</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> local xMin = frame.args.xAxisMin</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> local xMin = frame.args.xAxisMin<ins style="font-weight: bold; text-decoration: none;"> or frame.args.xaxismin</ins></div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> local xMax = frame.args.xAxisMax</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> local xMax = frame.args.xAxisMax<ins style="font-weight: bold; text-decoration: none;"> or frame.args.xaxismax</ins></div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> local yMin = frame.args.yAxisMin</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> local yMin = frame.args.yAxisMin<ins style="font-weight: bold; text-decoration: none;"> or frame.args.yaxismin</ins></div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> local yMax = frame.args.yAxisMax</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> local yMax = frame.args.yAxisMax<ins style="font-weight: bold; text-decoration: none;"> or frame.args.yaxismax</ins></div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> -- override x and y axis label formatting</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> -- override x and y axis label formatting</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> local xAxisFormat = frame.args.xAxisFormat</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> local xAxisFormat = frame.args.xAxisFormat<ins style="font-weight: bold; text-decoration: none;"> or frame.args.xaxisformat</ins></div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> local yAxisFormat = frame.args.yAxisFormat</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> local yAxisFormat = frame.args.yAxisFormat<ins style="font-weight: bold; text-decoration: none;"> or frame.args.yaxisformat</ins></div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> local xAxisAngle = tonumber(frame.args.xAxisAngle)</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> local xAxisAngle = tonumber(frame.args.xAxisAngle<ins style="font-weight: bold; text-decoration: none;">) or tonumber(frame.args.xaxisangle</ins>)</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> -- x and y scale types</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> -- x and y scale types</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> local xScaleType = frame.args.xScaleType <del style="font-weight: bold; text-decoration: none;"> </del></div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> local xScaleType = frame.args.xScaleType <ins style="font-weight: bold; text-decoration: none;">or frame.args.xscaletype </ins></div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> local yScaleType = frame.args.yScaleType </div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> local yScaleType = frame.args.yScaleType<ins style="font-weight: bold; text-decoration: none;"> or frame.args.yscaletype </ins> </div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>-- log scale require minimum &gt; 0, for now it's no possible to plot negative values on log - TODO see: https://www.mathworks.com/matlabcentral/answers/1792-log-scale-graphic-with-negative-value</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>-- log scale require minimum &gt; 0, for now it's no possible to plot negative values on log - TODO see: https://www.mathworks.com/matlabcentral/answers/1792-log-scale-graphic-with-negative-value</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>-- if xScaleType == "log" then</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>-- if xScaleType == "log" then</div></td> </tr> <tr> <td colspan="2" class="diff-lineno">Zeile 982:</td> <td colspan="2" class="diff-lineno">Zeile 983:</td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> -- show grid</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> -- show grid</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> local xGrid = frame.args.xGrid or false</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> local xGrid = frame.args.xGrid<ins style="font-weight: bold; text-decoration: none;"> or frame.args.xgrid</ins> or false</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> local yGrid = frame.args.yGrid or false</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> local yGrid = frame.args.yGrid<ins style="font-weight: bold; text-decoration: none;"> or frame.args.ygrid</ins> or false</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> -- for line chart, show a symbol at each data point</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> -- for line chart, show a symbol at each data point</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> local showSymbols = frame.args.showSymbols</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> local showSymbols = frame.args.showSymbols<ins style="font-weight: bold; text-decoration: none;"> or frame.args.showsymbols</ins></div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> local symbolsShape = frame.args.symbolsShape</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> local symbolsShape = frame.args.symbolsShape<ins style="font-weight: bold; text-decoration: none;"> or frame.args.symbolsshape</ins></div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> local symbolsNoFill = frame.args.symbolsNoFill</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> local symbolsNoFill = frame.args.symbolsNoFill<ins style="font-weight: bold; text-decoration: none;"> or frame.args.symbolsnofill </ins></div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> local symbolsStroke = tonumber(frame.args.symbolsStroke)</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> local symbolsStroke = tonumber(frame.args.symbolsStroke)</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> -- show legend with given title</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> -- show legend with given title</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> local legendTitle = frame.args.legend</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> local legendTitle = frame.args.legend</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> -- show values as text</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> -- show values as text</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> local showValues = frame.args.showValues</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> local showValues = frame.args.showValues<ins style="font-weight: bold; text-decoration: none;"> or frame.args.showvalues </ins></div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> -- pie chart radiuses</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> -- pie chart radiuses</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> local innerRadius = tonumber(frame.args.innerRadius) or 0</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> local innerRadius = tonumber(frame.args.innerRadius<ins style="font-weight: bold; text-decoration: none;">) or tonumber(frame.args.innerradius</ins>) or 0</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> local outerRadius = math.min(graphwidth, graphheight)</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> local outerRadius = math.min(graphwidth, graphheight)</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> -- format JSON output</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> -- format JSON output</div></td> </tr> <tr> <td colspan="2" class="diff-lineno">Zeile 1.012:</td> <td colspan="2" class="diff-lineno">Zeile 1.013:</td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> yValues[yNum] = value</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> yValues[yNum] = value</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> -- name the series: default is "y&lt;number&gt;". Can be overwritten using the "y&lt;number&gt;Title" parameters.</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> -- name the series: default is "y&lt;number&gt;". Can be overwritten using the "y&lt;number&gt;Title" parameters.</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> seriesTitles[yNum] = frame.args["y" .. yNum .. "Title"] or name</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> seriesTitles[yNum] = frame.args["y" .. yNum .. "Title<ins style="font-weight: bold; text-decoration: none;">"] or frame.args["y" .. yNum .. "title</ins>"] or name</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> end</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> end</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> end</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> end</div></td> </tr> <tr> <td colspan="2" class="diff-lineno">Zeile 1.204:</td> <td colspan="2" class="diff-lineno">Zeile 1.205:</td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> -- axes</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> -- axes</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> local xAxis, yAxis = getAxes(xTitle, xAxisFormat, xAxisAngle, xType, xGrid, yTitle, yAxisFormat, yType, yGrid, chartType)</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> local xAxis, yAxis = getAxes(xTitle, xAxisFormat, xAxisAngle, xType, xGrid, yTitle, yAxisFormat, yType, yGrid, chartType)</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> </div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><br /></td> <td colspan="2" class="diff-empty diff-side-added"></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> -- legend</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> -- legend</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> local legend</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> local legend</div></td> </tr> </table> Jura1 https://de.wikipedia.org/w/index.php?title=Modul:Graph/sandbox&diff=199883511&oldid=prev Pietrasagh: other symbols shapes, symbols and line-widths serialization, see update notes 2020-05-12T17:32:57Z <p>other symbols shapes, symbols and line-widths serialization, see update notes</p> <a href="//de.wikipedia.org/w/index.php?title=Modul:Graph/sandbox&amp;diff=199883511&amp;oldid=197987497">Änderungen zeigen</a> Pietrasagh https://de.wikipedia.org/w/index.php?title=Modul:Graph/sandbox&diff=197987497&oldid=prev Pietrasagh: AZ: Die Seite wurde neu angelegt: -- ATTENTION: Please edit this code at https://de.wikipedia.org/wiki/Modul:Graph -- This… 2020-03-22T06:43:42Z <p><a href="/wiki/Hilfe:Zusammenfassung_und_Quellen#Auto-Zusammenfassung" title="Hilfe:Zusammenfassung und Quellen">AZ</a>: Die Seite wurde neu angelegt: -- ATTENTION: Please edit this code at https://de.wikipedia.org/wiki/Modul:Graph -- This…</p> <p><b>Neue Seite</b></p><div>-- ATTENTION: Please edit this code at https://de.wikipedia.org/wiki/Modul:Graph<br /> -- This way all wiki languages can stay in sync. Thank you!<br /> --<br /> -- Version History (_PLEASE UPDATE when modifying anything_):<br /> -- 2020-03-11 Allow user-defined scale types, e.g. logarithmic scale<br /> -- 2019-11-08 Apply color-inversion-friendliness to legend title, labels, and xGrid<br /> -- 2019-01-24 Allow comma-separated lists to contain values with commas<br /> -- 2018-10-13 Fix browser color-inversion issues via #54595d per [[mw:Template:Graph:PageViews]]<br /> -- 2018-09-16 Allow disabling the legend for templates<br /> -- 2018-09-10 Allow grid lines<br /> -- 2018-08-26 Use user-defined order for stacked charts<br /> -- 2018-02-11 Force usage of explicitely provided x minimum and/or maximum values, rotation of x labels<br /> -- 2017-08-08 Added showSymbols param to show symbols on line charts<br /> -- 2016-05-16 Added encodeTitleForPath() to help all path-based APIs graphs like pageviews<br /> -- 2016-03-20 Allow omitted data for charts, labels for line charts with string (ordinal) scale at point location<br /> -- 2016-01-28 For maps, always use wikiraw:// protocol. https:// will be disabled soon.<br /> <br /> local p = {}<br /> <br /> local baseMapDirectory = &quot;Module:Graph/&quot;<br /> local persistentGrey = &quot;#54595d&quot;<br /> <br /> local function numericArray(csv)<br /> if not csv then return end<br /> <br /> local list = mw.text.split(csv, &quot;%s*,%s*&quot;)<br /> local result = {}<br /> local isInteger = true<br /> for i = 1, #list do<br /> if list[i] == &quot;&quot; then<br /> result[i] = nil<br /> else<br /> result[i] = tonumber(list[i])<br /> if not result[i] then return end<br /> if isInteger then<br /> local int, frac = math.modf(result[i])<br /> isInteger = frac == 0.0<br /> end<br /> end<br /> end<br /> return result, isInteger<br /> end<br /> <br /> local function stringArray(text)<br /> if not text then return end<br /> <br /> local list = mw.text.split(mw.ustring.gsub(tostring(text), &quot;\\,&quot;, &quot;&lt;COMMA&gt;&quot;), &quot;,&quot;, true)<br /> for i = 1, #list do<br /> list[i] = mw.ustring.gsub(mw.text.trim(list[i]), &quot;&lt;COMMA&gt;&quot;, &quot;,&quot;)<br /> end<br /> return list<br /> end<br /> <br /> local function isTable(t) return type(t) == &quot;table&quot; end<br /> <br /> local function copy(x)<br /> if type(x) == &quot;table&quot; then<br /> local result = {}<br /> for key, value in pairs(x) do result[key] = copy(value) end<br /> return result<br /> else<br /> return x<br /> end<br /> end<br /> <br /> function p.map(frame)<br /> -- map path data for geographic objects<br /> local basemap = frame.args.basemap or &quot;WorldMap-iso2.json&quot; -- WorldMap name and/or location may vary from wiki to wiki<br /> -- scaling factor<br /> local scale = tonumber(frame.args.scale) or 100<br /> -- map projection, see https://github.com/mbostock/d3/wiki/Geo-Projections<br /> local projection = frame.args.projection or &quot;equirectangular&quot;<br /> -- defaultValue for geographic objects without data<br /> local defaultValue = frame.args.defaultValue<br /> local scaleType = frame.args.scaleType or &quot;linear&quot;<br /> -- minimaler Wertebereich (nur für numerische Daten)<br /> local domainMin = tonumber(frame.args.domainMin)<br /> -- maximaler Wertebereich (nur für numerische Daten)<br /> local domainMax = tonumber(frame.args.domainMax)<br /> -- Farbwerte der Farbskala (nur für numerische Daten)<br /> local colorScale = frame.args.colorScale or &quot;category10&quot;<br /> -- show legend<br /> local legend = frame.args.legend<br /> -- format JSON output<br /> local formatJson = frame.args.formatjson<br /> <br /> -- map data are key-value pairs: keys are non-lowercase strings (ideally ISO codes) which need to match the &quot;id&quot; values of the map path data<br /> local values = {}<br /> local isNumbers = nil<br /> for name, value in pairs(frame.args) do<br /> if mw.ustring.find(name, &quot;^[^%l]+$&quot;) and value and value ~= &quot;&quot; then<br /> if isNumbers == nil then isNumbers = tonumber(value) end<br /> local data = { id = name, v = value }<br /> if isNumbers then data.v = tonumber(data.v) end<br /> table.insert(values, data)<br /> end<br /> end<br /> if not defaultValue then<br /> if isNumbers then defaultValue = 0 else defaultValue = &quot;silver&quot; end<br /> end<br /> <br /> -- create highlight scale<br /> local scales<br /> if isNumbers then<br /> if colorScale then colorScale = string.lower(colorScale) end<br /> if colorScale == &quot;category10&quot; or colorScale == &quot;category20&quot; then else colorScale = stringArray(colorScale) end<br /> scales =<br /> {<br /> {<br /> name = &quot;color&quot;,<br /> type = scaleType,<br /> domain = { data = &quot;highlights&quot;, field = &quot;v&quot; },<br /> range = colorScale,<br /> nice = true,<br /> zero = false<br /> }<br /> }<br /> if domainMin then scales[1].domainMin = domainMin end<br /> if domainMax then scales[1].domainMax = domainMax end<br /> <br /> local exponent = string.match(scaleType, &quot;pow%s+(%d+%.?%d+)&quot;) -- check for exponent<br /> if exponent then<br /> scales[1].type = &quot;pow&quot;<br /> scales[1].exponent = exponent<br /> end<br /> end<br /> <br /> -- create legend<br /> if legend then<br /> legend =<br /> {<br /> {<br /> fill = &quot;color&quot;,<br /> offset = 120,<br /> properties =<br /> {<br /> title = { fontSize = { value = 14 } },<br /> labels = { fontSize = { value = 12 } },<br /> legend =<br /> {<br /> stroke = { value = &quot;silver&quot; },<br /> strokeWidth = { value = 1.5 }<br /> }<br /> }<br /> }<br /> }<br /> end<br /> <br /> -- get map url<br /> local basemapUrl<br /> if (string.sub(basemap, 1, 10) == &quot;wikiraw://&quot;) then<br /> basemapUrl = basemap<br /> else<br /> -- if not a (supported) url look for a colon as namespace separator. If none prepend default map directory name.<br /> if not string.find(basemap, &quot;:&quot;) then basemap = baseMapDirectory .. basemap end<br /> basemapUrl = &quot;wikiraw:///&quot; .. mw.uri.encode(mw.title.new(basemap).prefixedText, &quot;PATH&quot;)<br /> end<br /> <br /> local output =<br /> {<br /> version = 2,<br /> width = 1, -- generic value as output size depends solely on map size and scaling factor<br /> height = 1, -- ditto<br /> data =<br /> {<br /> {<br /> -- data source for the highlights<br /> name = &quot;highlights&quot;,<br /> values = values<br /> },<br /> {<br /> -- data source for map paths data<br /> name = &quot;countries&quot;,<br /> url = basemapUrl,<br /> format = { type = &quot;topojson&quot;, feature = &quot;countries&quot; },<br /> transform =<br /> {<br /> {<br /> -- geographic transformation (&quot;geopath&quot;) of map paths data<br /> type = &quot;geopath&quot;,<br /> value = &quot;data&quot;, -- data source<br /> scale = scale,<br /> translate = { 0, 0 },<br /> projection = projection<br /> },<br /> {<br /> -- join (&quot;zip&quot;) of mutiple data source: here map paths data and highlights<br /> type = &quot;lookup&quot;,<br /> keys = { &quot;id&quot; }, -- key for map paths data<br /> on = &quot;highlights&quot;, -- name of highlight data source<br /> onKey = &quot;id&quot;, -- key for highlight data source<br /> as = { &quot;zipped&quot; }, -- name of resulting table<br /> default = { v = defaultValue } -- default value for geographic objects that could not be joined<br /> }<br /> }<br /> }<br /> },<br /> marks =<br /> {<br /> -- output markings (map paths and highlights)<br /> {<br /> type = &quot;path&quot;,<br /> from = { data = &quot;countries&quot; },<br /> properties =<br /> {<br /> enter = { path = { field = &quot;layout_path&quot; } },<br /> update = { fill = { field = &quot;zipped.v&quot; } },<br /> hover = { fill = { value = &quot;darkgrey&quot; } }<br /> }<br /> }<br /> },<br /> legends = legend<br /> }<br /> if (scales) then<br /> output.scales = scales<br /> output.marks[1].properties.update.fill.scale = &quot;color&quot;<br /> end<br /> <br /> local flags<br /> if formatJson then flags = mw.text.JSON_PRETTY end<br /> return mw.text.jsonEncode(output, flags)<br /> end<br /> <br /> local function deserializeXData(serializedX, xType, xMin, xMax)<br /> local x<br /> <br /> if not xType or xType == &quot;integer&quot; or xType == &quot;number&quot; then<br /> local isInteger<br /> x, isInteger = numericArray(serializedX)<br /> if x then<br /> xMin = tonumber(xMin)<br /> xMax = tonumber(xMax)<br /> if not xType then<br /> if isInteger then xType = &quot;integer&quot; else xType = &quot;number&quot; end<br /> end<br /> else<br /> if xType then error(&quot;Numbers expected for parameter &#039;x&#039;&quot;) end<br /> end<br /> end<br /> if not x then<br /> x = stringArray(serializedX)<br /> if not xType then xType = &quot;string&quot; end<br /> end<br /> <br /> return x, xType, xMin, xMax<br /> end<br /> <br /> local function deserializeYData(serializedYs, yType, yMin, yMax)<br /> local y = {}<br /> local areAllInteger = true<br /> <br /> for yNum, value in pairs(serializedYs) do<br /> local yValues<br /> if not yType or yType == &quot;integer&quot; or yType == &quot;number&quot; then<br /> local isInteger<br /> yValues, isInteger = numericArray(value)<br /> if yValues then<br /> areAllInteger = areAllInteger and isInteger<br /> else<br /> if yType then<br /> error(&quot;Numbers expected for parameter &#039;&quot; .. name .. &quot;&#039;&quot;)<br /> else<br /> return deserializeYData(serializedYs, &quot;string&quot;, yMin, yMax)<br /> end<br /> end<br /> end<br /> if not yValues then yValues = stringArray(value) end<br /> <br /> y[yNum] = yValues<br /> end<br /> if not yType then<br /> if areAllInteger then yType = &quot;integer&quot; else yType = &quot;number&quot; end<br /> end<br /> if yType == &quot;integer&quot; or yType == &quot;number&quot; then<br /> yMin = tonumber(yMin)<br /> yMax = tonumber(yMax)<br /> end<br /> <br /> return y, yType, yMin, yMax<br /> end<br /> <br /> local function convertXYToManySeries(x, y, xType, yType, seriesTitles)<br /> local data =<br /> {<br /> name = &quot;chart&quot;,<br /> format =<br /> {<br /> type = &quot;json&quot;,<br /> parse = { x = xType, y = yType }<br /> },<br /> values = {}<br /> }<br /> for i = 1, #y do<br /> local yLen = table.maxn(y[i])<br /> for j = 1, #x do<br /> if j &lt;= yLen and y[i][j] then table.insert(data.values, { series = seriesTitles[i], x = x[j], y = y[i][j] }) end<br /> end<br /> end<br /> return data<br /> end<br /> <br /> local function convertXYToSingleSeries(x, y, xType, yType, yNames)<br /> local data = { name = &quot;chart&quot;, format = { type = &quot;json&quot;, parse = { x = xType } }, values = {} }<br /> <br /> for j = 1, #y do data.format.parse[yNames[j]] = yType end<br /> <br /> for i = 1, #x do<br /> local item = { x = x[i] }<br /> for j = 1, #y do item[yNames[j]] = y[j][i] end<br /> <br /> table.insert(data.values, item)<br /> end<br /> return data<br /> end<br /> <br /> local function getXScale(chartType, stacked, xMin, xMax, xType, xScaleType)<br /> if chartType == &quot;pie&quot; then return end<br /> <br /> local xscale =<br /> {<br /> name = &quot;x&quot;,<br /> range = &quot;width&quot;,<br /> zero = false, -- do not include zero value<br /> nice = true, -- force round numbers for y scale<br /> domain = { data = &quot;chart&quot;, field = &quot;x&quot; }<br /> }<br /> if xScaleType then xscale.type = xScaleType else xscale.type = &quot;linear&quot; end<br /> if xMin then xscale.domainMin = xMin end<br /> if xMax then xscale.domainMax = xMax end<br /> if xMin or xMax then<br /> xscale.clamp = true<br /> xscale.nice = false<br /> end<br /> if chartType == &quot;rect&quot; then<br /> xscale.type = &quot;ordinal&quot;<br /> if not stacked then xscale.padding = 0.2 end -- pad each bar group<br /> else<br /> if xType == &quot;date&quot; then xscale.type = &quot;time&quot;<br /> elseif xType == &quot;string&quot; then<br /> xscale.type = &quot;ordinal&quot;<br /> xscale.points = true<br /> end<br /> end<br /> <br /> return xscale<br /> end<br /> <br /> local function getYScale(chartType, stacked, yMin, yMax, yType, yScaleType)<br /> if chartType == &quot;pie&quot; then return end<br /> <br /> local yscale =<br /> {<br /> name = &quot;y&quot;,<br /> range = &quot;height&quot;,<br /> -- area charts have the lower boundary of their filling at y=0 (see marks.properties.enter.y2), therefore these need to start at zero<br /> zero = chartType ~= &quot;line&quot;,<br /> nice = true<br /> }<br /> if yScaleType then yscale.type = yScaleType else yscale.type = &quot;linear&quot; end<br /> if yMin then yscale.domainMin = yMin end<br /> if yMax then yscale.domainMax = yMax end<br /> if yMin or yMax then yscale.clamp = true end<br /> if yType == &quot;date&quot; then yscale.type = &quot;time&quot;<br /> elseif yType == &quot;string&quot; then yscale.type = &quot;ordinal&quot; end<br /> if stacked then<br /> yscale.domain = { data = &quot;stats&quot;, field = &quot;sum_y&quot; }<br /> else<br /> yscale.domain = { data = &quot;chart&quot;, field = &quot;y&quot; }<br /> end<br /> <br /> return yscale<br /> end<br /> <br /> local function getColorScale(colors, chartType, xCount, yCount)<br /> if not colors then<br /> if (chartType == &quot;pie&quot; and xCount &gt; 10) or yCount &gt; 10 then colors = &quot;category20&quot; else colors = &quot;category10&quot; end<br /> end<br /> <br /> local colorScale =<br /> {<br /> name = &quot;color&quot;,<br /> type = &quot;ordinal&quot;,<br /> range = colors,<br /> domain = { data = &quot;chart&quot;, field = &quot;series&quot; }<br /> }<br /> if chartType == &quot;pie&quot; then colorScale.domain.field = &quot;x&quot; end<br /> return colorScale<br /> end<br /> <br /> local function getAlphaColorScale(colors, y)<br /> local alphaScale<br /> -- if there is at least one color in the format &quot;#aarrggbb&quot;, create a transparency (alpha) scale<br /> if isTable(colors) then<br /> local alphas = {}<br /> local hasAlpha = false<br /> for i = 1, #colors do<br /> local a, rgb = string.match(colors[i], &quot;#(%x%x)(%x%x%x%x%x%x)&quot;)<br /> if a then<br /> hasAlpha = true<br /> alphas[i] = tostring(tonumber(a, 16) / 255.0)<br /> colors[i] = &quot;#&quot; .. rgb<br /> else<br /> alphas[i] = &quot;1&quot;<br /> end<br /> end<br /> for i = #colors + 1, #y do alphas[i] = &quot;1&quot; end<br /> if hasAlpha then alphaScale = { name = &quot;transparency&quot;, type = &quot;ordinal&quot;, range = alphas } end<br /> end<br /> return alphaScale<br /> end<br /> <br /> local function getValueScale(fieldName, min, max, type)<br /> local valueScale =<br /> {<br /> name = fieldName,<br /> type = type or &quot;linear&quot;,<br /> domain = { data = &quot;chart&quot;, field = fieldName },<br /> range = { min, max }<br /> }<br /> return valueScale<br /> end<br /> <br /> local function addInteractionToChartVisualisation(plotMarks, colorField, dataField)<br /> -- initial setup<br /> if not plotMarks.properties.enter then plotMarks.properties.enter = {} end<br /> plotMarks.properties.enter[colorField] = { scale = &quot;color&quot;, field = dataField }<br /> <br /> -- action when cursor is over plot mark: highlight<br /> if not plotMarks.properties.hover then plotMarks.properties.hover = {} end<br /> plotMarks.properties.hover[colorField] = { value = &quot;red&quot; }<br /> <br /> -- action when cursor leaves plot mark: reset to initial setup<br /> if not plotMarks.properties.update then plotMarks.properties.update = {} end<br /> plotMarks.properties.update[colorField] = { scale = &quot;color&quot;, field = dataField }<br /> end<br /> <br /> local function getPieChartVisualisation(yCount, innerRadius, outerRadius, linewidth, radiusScale)<br /> local chartvis =<br /> {<br /> type = &quot;arc&quot;,<br /> from = { data = &quot;chart&quot;, transform = { { field = &quot;y&quot;, type = &quot;pie&quot; } } },<br /> <br /> properties =<br /> {<br /> enter = {<br /> innerRadius = { value = innerRadius },<br /> outerRadius = { },<br /> startAngle = { field = &quot;layout_start&quot; },<br /> endAngle = { field = &quot;layout_end&quot; },<br /> stroke = { value = &quot;white&quot; },<br /> strokeWidth = { value = linewidth or 1 }<br /> }<br /> }<br /> }<br /> <br /> if radiusScale then<br /> chartvis.properties.enter.outerRadius.scale = radiusScale.name<br /> chartvis.properties.enter.outerRadius.field = radiusScale.domain.field<br /> else<br /> chartvis.properties.enter.outerRadius.value = outerRadius<br /> end<br /> <br /> addInteractionToChartVisualisation(chartvis, &quot;fill&quot;, &quot;x&quot;)<br /> <br /> return chartvis<br /> end<br /> <br /> local function getChartVisualisation(chartType, stacked, colorField, yCount, innerRadius, outerRadius, linewidth, alphaScale, radiusScale, interpolate)<br /> if chartType == &quot;pie&quot; then return getPieChartVisualisation(yCount, innerRadius, outerRadius, linewidth, radiusScale) end<br /> <br /> local chartvis =<br /> {<br /> type = chartType,<br /> properties =<br /> {<br /> -- chart creation event handler<br /> enter =<br /> {<br /> x = { scale = &quot;x&quot;, field = &quot;x&quot; },<br /> y = { scale = &quot;y&quot;, field = &quot;y&quot; }<br /> }<br /> }<br /> }<br /> addInteractionToChartVisualisation(chartvis, colorField, &quot;series&quot;)<br /> if colorField == &quot;stroke&quot; then<br /> chartvis.properties.enter.strokeWidth = { value = linewidth or 2.5 }<br /> end<br /> <br /> if interpolate then chartvis.properties.enter.interpolate = { value = interpolate } end<br /> <br /> if alphaScale then chartvis.properties.update[colorField .. &quot;Opacity&quot;] = { scale = &quot;transparency&quot; } end<br /> -- for bars and area charts set the lower bound of their areas<br /> if chartType == &quot;rect&quot; or chartType == &quot;area&quot; then<br /> if stacked then<br /> -- for stacked charts this lower bound is the end of the last stacking element<br /> chartvis.properties.enter.y2 = { scale = &quot;y&quot;, field = &quot;layout_end&quot; }<br /> else<br /> --[[<br /> for non-stacking charts the lower bound is y=0<br /> TODO: &quot;yscale.zero&quot; is currently set to &quot;true&quot; for this case, but &quot;false&quot; for all other cases.<br /> For the similar behavior &quot;y2&quot; should actually be set to where y axis crosses the x axis,<br /> if there are only positive or negative values in the data ]]<br /> chartvis.properties.enter.y2 = { scale = &quot;y&quot;, value = 0 }<br /> end<br /> end<br /> -- for bar charts ...<br /> if chartType == &quot;rect&quot; then<br /> -- set 1 pixel width between the bars<br /> chartvis.properties.enter.width = { scale = &quot;x&quot;, band = true, offset = -1 }<br /> -- for multiple series the bar marking needs to use the &quot;inner&quot; series scale, whereas the &quot;outer&quot; x scale is used by the grouping<br /> if not stacked and yCount &gt; 1 then<br /> chartvis.properties.enter.x.scale = &quot;series&quot;<br /> chartvis.properties.enter.x.field = &quot;series&quot;<br /> chartvis.properties.enter.width.scale = &quot;series&quot;<br /> end<br /> end<br /> -- stacked charts have their own (stacked) y values<br /> if stacked then chartvis.properties.enter.y.field = &quot;layout_start&quot; end<br /> <br /> -- if there are multiple series group these together<br /> if yCount == 1 then<br /> chartvis.from = { data = &quot;chart&quot; }<br /> else<br /> -- if there are multiple series, connect colors to series<br /> chartvis.properties.update[colorField].field = &quot;series&quot;<br /> if alphaScale then chartvis.properties.update[colorField .. &quot;Opacity&quot;].field = &quot;series&quot; end<br /> -- apply a grouping (facetting) transformation<br /> chartvis =<br /> {<br /> type = &quot;group&quot;,<br /> marks = { chartvis },<br /> from =<br /> {<br /> data = &quot;chart&quot;,<br /> transform =<br /> {<br /> {<br /> type = &quot;facet&quot;,<br /> groupby = { &quot;series&quot; }<br /> }<br /> }<br /> }<br /> }<br /> -- for stacked charts apply a stacking transformation<br /> if stacked then<br /> table.insert(chartvis.from.transform, 1, { type = &quot;stack&quot;, groupby = { &quot;x&quot; }, sortby = { &quot;-_id&quot; }, field = &quot;y&quot; } )<br /> else<br /> -- for bar charts the series are side-by-side grouped by x<br /> if chartType == &quot;rect&quot; then<br /> -- for bar charts with multiple series: each serie is grouped by the x value, therefore the series need their own scale within each x group<br /> local groupScale =<br /> {<br /> name = &quot;series&quot;,<br /> type = &quot;ordinal&quot;,<br /> range = &quot;width&quot;,<br /> domain = { field = &quot;series&quot; }<br /> }<br /> <br /> chartvis.from.transform[1].groupby = &quot;x&quot;<br /> chartvis.scales = { groupScale }<br /> chartvis.properties = { enter = { x = { field = &quot;key&quot;, scale = &quot;x&quot; }, width = { scale = &quot;x&quot;, band = true } } }<br /> end<br /> end<br /> end<br /> <br /> return chartvis<br /> end<br /> <br /> local function getTextMarks(chartvis, chartType, outerRadius, scales, radiusScale, yType, showValues)<br /> local properties<br /> if chartType == &quot;rect&quot; then<br /> properties =<br /> {<br /> x = { scale = chartvis.properties.enter.x.scale, field = chartvis.properties.enter.x.field },<br /> y = { scale = chartvis.properties.enter.y.scale, field = chartvis.properties.enter.y.field, offset = -(tonumber(showValues.offset) or -4) },<br /> --dx = { scale = chartvis.properties.enter.x.scale, band = true, mult = 0.5 }, -- for horizontal text<br /> dy = { scale = chartvis.properties.enter.x.scale, band = true, mult = 0.5 }, -- for vertical text<br /> align = { },<br /> baseline = { value = &quot;middle&quot; },<br /> fill = { },<br /> angle = { value = -90 },<br /> fontSize = { value = tonumber(showValues.fontsize) or 11 }<br /> }<br /> if properties.y.offset &gt;= 0 then<br /> properties.align.value = &quot;right&quot;<br /> properties.fill.value = showValues.fontcolor or &quot;white&quot;<br /> else<br /> properties.align.value = &quot;left&quot;<br /> properties.fill.value = showValues.fontcolor or &quot;black&quot;<br /> end<br /> elseif chartType == &quot;pie&quot; then<br /> properties =<br /> {<br /> x = { group = &quot;width&quot;, mult = 0.5 },<br /> y = { group = &quot;height&quot;, mult = 0.5 },<br /> radius = { offset = tonumber(showValues.offset) or -4 },<br /> theta = { field = &quot;layout_mid&quot; },<br /> fill = { value = showValues.fontcolor or &quot;black&quot; },<br /> baseline = { },<br /> angle = { },<br /> fontSize = { value = tonumber(showValues.fontsize) or math.ceil(outerRadius / 10) }<br /> }<br /> if (showValues.angle or &quot;midangle&quot;) == &quot;midangle&quot; then<br /> properties.align = { value = &quot;center&quot; }<br /> properties.angle = { field = &quot;layout_mid&quot;, mult = 180.0 / math.pi }<br /> <br /> if properties.radius.offset &gt;= 0 then<br /> properties.baseline.value = &quot;bottom&quot;<br /> else<br /> if not showValues.fontcolor then properties.fill.value = &quot;white&quot; end<br /> properties.baseline.value = &quot;top&quot;<br /> end<br /> elseif tonumber(showValues.angle) then<br /> -- qunatize scale for aligning text left on right half-circle and right on left half-circle<br /> local alignScale = { name = &quot;align&quot;, type = &quot;quantize&quot;, domainMin = 0.0, domainMax = math.pi * 2, range = { &quot;left&quot;, &quot;right&quot; } }<br /> table.insert(scales, alignScale)<br /> <br /> properties.align = { scale = alignScale.name, field = &quot;layout_mid&quot; }<br /> properties.angle = { value = tonumber(showValues.angle) }<br /> properties.baseline.value = &quot;middle&quot;<br /> if not tonumber(showValues.offset) then properties.radius.offset = 4 end<br /> end<br /> <br /> if radiusScale then<br /> properties.radius.scale = radiusScale.name<br /> properties.radius.field = radiusScale.domain.field<br /> else<br /> properties.radius.value = outerRadius<br /> end<br /> end<br /> <br /> if properties then<br /> if showValues.format then<br /> local template = &quot;datum.y&quot;<br /> if yType == &quot;integer&quot; or yType == &quot;number&quot; then template = template .. &quot;|number:&#039;&quot; .. showValues.format .. &quot;&#039;&quot;<br /> elseif yType == &quot;date&quot; then template = template .. &quot;|time:&quot; .. showValues.format .. &quot;&#039;&quot;<br /> end<br /> properties.text = { template = &quot;{{&quot; .. template .. &quot;}}&quot; }<br /> else<br /> properties.text = { field = &quot;y&quot; }<br /> end<br /> <br /> local textmarks =<br /> {<br /> type = &quot;text&quot;,<br /> properties =<br /> {<br /> enter = properties<br /> }<br /> }<br /> if chartvis.from then textmarks.from = copy(chartvis.from) end<br /> <br /> return textmarks<br /> end<br /> end<br /> <br /> local function getSymbolMarks(chartvis)<br /> local symbolmarks =<br /> {<br /> type = &quot;symbol&quot;,<br /> properties =<br /> {<br /> enter = <br /> {<br /> x = { scale = &quot;x&quot;, field = &quot;x&quot; },<br /> y = { scale = &quot;y&quot;, field = &quot;y&quot; },<br /> fill = { scale = &quot;color&quot;, field = &quot;series&quot; },<br /> shape = &quot;circle&quot;,<br /> size = { value = 49 }<br /> }<br /> }<br /> }<br /> if chartvis.from then symbolmarks.from = copy(chartvis.from) end<br /> <br /> return symbolmarks<br /> end<br /> <br /> local function getAxes(xTitle, xAxisFormat, xAxisAngle, xType, xGrid, yTitle, yAxisFormat, yType, yGrid, chartType)<br /> local xAxis, yAxis<br /> if chartType ~= &quot;pie&quot; then<br /> if xType == &quot;integer&quot; and not xAxisFormat then xAxisFormat = &quot;d&quot; end<br /> xAxis =<br /> {<br /> type = &quot;x&quot;,<br /> scale = &quot;x&quot;,<br /> title = xTitle,<br /> format = xAxisFormat,<br /> grid = xGrid ~= &quot;0&quot;<br /> }<br /> if xAxisAngle then<br /> local xAxisAlign<br /> if xAxisAngle &lt; 0 then xAxisAlign = &quot;right&quot; else xAxisAlign = &quot;left&quot; end<br /> xAxis.properties =<br /> {<br /> title =<br /> {<br /> fill = { value = persistentGrey }<br /> },<br /> labels =<br /> {<br /> angle = { value = xAxisAngle },<br /> align = { value = xAxisAlign },<br /> fill = { value = persistentGrey }<br /> },<br /> ticks =<br /> {<br /> stroke = { value = persistentGrey }<br /> },<br /> axis =<br /> {<br /> stroke = { value = persistentGrey },<br /> strokeWidth = { value = 2 }<br /> },<br /> grid =<br /> {<br /> stroke = { value = persistentGrey }<br /> }<br /> }<br /> else<br /> xAxis.properties =<br /> {<br /> title =<br /> {<br /> fill = { value = persistentGrey }<br /> },<br /> labels =<br /> {<br /> fill = { value = persistentGrey }<br /> },<br /> ticks =<br /> {<br /> stroke = { value = persistentGrey }<br /> },<br /> axis =<br /> {<br /> stroke = { value = persistentGrey },<br /> strokeWidth = { value = 2 }<br /> },<br /> grid =<br /> {<br /> stroke = { value = persistentGrey }<br /> }<br /> }<br /> end<br /> <br /> if yType == &quot;integer&quot; and not yAxisFormat then yAxisFormat = &quot;d&quot; end<br /> yAxis =<br /> {<br /> type = &quot;y&quot;,<br /> scale = &quot;y&quot;,<br /> title = yTitle,<br /> format = yAxisFormat,<br /> grid = yGrid ~= &quot;0&quot;<br /> }<br /> yAxis.properties =<br /> {<br /> title =<br /> {<br /> fill = { value = persistentGrey }<br /> },<br /> labels =<br /> {<br /> fill = { value = persistentGrey }<br /> },<br /> ticks =<br /> {<br /> stroke = { value = persistentGrey }<br /> },<br /> axis =<br /> {<br /> stroke = { value = persistentGrey },<br /> strokeWidth = { value = 2 }<br /> },<br /> grid =<br /> {<br /> stroke = { value = persistentGrey }<br /> }<br /> }<br /> end<br /> <br /> return xAxis, yAxis<br /> end<br /> <br /> local function getLegend(legendTitle, chartType, outerRadius)<br /> local legend =<br /> {<br /> fill = &quot;color&quot;,<br /> stroke = &quot;color&quot;,<br /> title = legendTitle,<br /> }<br /> legend.properties = {<br /> title = {<br /> fill = { value = persistentGrey },<br /> },<br /> labels = {<br /> fill = { value = persistentGrey },<br /> },<br /> }<br /> if chartType == &quot;pie&quot; then<br /> legend.properties = {<br /> -- move legend from center position to top<br /> legend = {<br /> y = { value = -outerRadius },<br /> },<br /> title = {<br /> fill = { value = persistentGrey }<br /> },<br /> labels = {<br /> fill = { value = persistentGrey },<br /> },<br /> }<br /> end<br /> return legend<br /> end<br /> <br /> function p.chart(frame)<br /> -- chart width and height<br /> local graphwidth = tonumber(frame.args.width) or 200<br /> local graphheight = tonumber(frame.args.height) or 200<br /> -- chart type<br /> local chartType = frame.args.type or &quot;line&quot;<br /> -- interpolation mode for line and area charts: linear, step-before, step-after, basis, basis-open, basis-closed (type=line only), bundle (type=line only), cardinal, cardinal-open, cardinal-closed (type=line only), monotone<br /> local interpolate = frame.args.interpolate<br /> -- mark colors (if no colors are given, the default 10 color palette is used)<br /> local colorString = frame.args.colors<br /> if colorString then colorString = string.lower(colorString) end<br /> local colors = stringArray(colorString)<br /> -- for line charts, the thickness of the line; for pie charts the gap between each slice<br /> local linewidth = tonumber(frame.args.linewidth)<br /> -- x and y axis caption<br /> local xTitle = frame.args.xAxisTitle<br /> local yTitle = frame.args.yAxisTitle<br /> -- x and y value types<br /> local xType = frame.args.xType<br /> local yType = frame.args.yType<br /> -- override x and y axis minimum and maximum<br /> local xMin = frame.args.xAxisMin<br /> local xMax = frame.args.xAxisMax<br /> local yMin = frame.args.yAxisMin<br /> local yMax = frame.args.yAxisMax<br /> -- override x and y axis label formatting<br /> local xAxisFormat = frame.args.xAxisFormat<br /> local yAxisFormat = frame.args.yAxisFormat<br /> local xAxisAngle = tonumber(frame.args.xAxisAngle)<br /> -- x and y scale types<br /> local xScaleType = frame.args.xScaleType <br /> local yScaleType = frame.args.yScaleType <br /> -- show grid<br /> local xGrid = frame.args.xGrid or &quot;0&quot;<br /> local yGrid = frame.args.yGrid or &quot;0&quot;<br /> -- for line chart, show a symbol at each data point<br /> local showSymbols = frame.args.showSymbols<br /> -- show legend with given title<br /> local legendTitle = frame.args.legend<br /> -- show values as text<br /> local showValues = frame.args.showValues<br /> -- pie chart radiuses<br /> local innerRadius = tonumber(frame.args.innerRadius) or 0<br /> local outerRadius = math.min(graphwidth, graphheight)<br /> -- format JSON output<br /> local formatJson = frame.args.formatjson<br /> <br /> -- get x values<br /> local x<br /> x, xType, xMin, xMax = deserializeXData(frame.args.x, xType, xMin, xMax)<br /> <br /> -- get y values (series)<br /> local yValues = {}<br /> local seriesTitles = {}<br /> for name, value in pairs(frame.args) do<br /> local yNum<br /> if name == &quot;y&quot; then yNum = 1 else yNum = tonumber(string.match(name, &quot;^y(%d+)$&quot;)) end<br /> if yNum then<br /> yValues[yNum] = value<br /> -- name the series: default is &quot;y&lt;number&gt;&quot;. Can be overwritten using the &quot;y&lt;number&gt;Title&quot; parameters.<br /> seriesTitles[yNum] = frame.args[&quot;y&quot; .. yNum .. &quot;Title&quot;] or name<br /> end<br /> end<br /> local y<br /> y, yType, yMin, yMax = deserializeYData(yValues, yType, yMin, yMax)<br /> <br /> -- create data tuples, consisting of series index, x value, y value<br /> local data<br /> if chartType == &quot;pie&quot; then<br /> -- for pie charts the second second series is merged into the first series as radius values<br /> data = convertXYToSingleSeries(x, y, xType, yType, { &quot;y&quot;, &quot;r&quot; })<br /> else<br /> data = convertXYToManySeries(x, y, xType, yType, seriesTitles)<br /> end<br /> <br /> -- configure stacked charts<br /> local stacked = false<br /> local stats<br /> if string.sub(chartType, 1, 7) == &quot;stacked&quot; then<br /> chartType = string.sub(chartType, 8)<br /> if #y &gt; 1 then -- ignore stacked charts if there is only one series<br /> stacked = true<br /> -- aggregate data by cumulative y values<br /> stats =<br /> {<br /> name = &quot;stats&quot;, source = &quot;chart&quot;, transform =<br /> {<br /> {<br /> type = &quot;aggregate&quot;,<br /> groupby = { &quot;x&quot; },<br /> summarize = { y = &quot;sum&quot; }<br /> }<br /> }<br /> }<br /> end<br /> end<br /> <br /> -- create scales<br /> local scales = {}<br /> <br /> local xscale = getXScale(chartType, stacked, xMin, xMax, xType, xScaleType)<br /> table.insert(scales, xscale)<br /> local yscale = getYScale(chartType, stacked, yMin, yMax, yType, yScaleType)<br /> table.insert(scales, yscale)<br /> <br /> local colorScale = getColorScale(colors, chartType, #x, #y)<br /> table.insert(scales, colorScale)<br /> <br /> local alphaScale = getAlphaColorScale(colors, y)<br /> table.insert(scales, alphaScale)<br /> <br /> local radiusScale<br /> if chartType == &quot;pie&quot; and #y &gt; 1 then<br /> radiusScale = getValueScale(&quot;r&quot;, 0, outerRadius)<br /> table.insert(scales, radiusScale)<br /> end<br /> <br /> -- decide if lines (strokes) or areas (fills) should be drawn<br /> local colorField<br /> if chartType == &quot;line&quot; then colorField = &quot;stroke&quot; else colorField = &quot;fill&quot; end<br /> <br /> -- create chart markings<br /> local chartvis = getChartVisualisation(chartType, stacked, colorField, #y, innerRadius, outerRadius, linewidth, alphaScale, radiusScale, interpolate)<br /> local marks = { chartvis }<br /> <br /> -- text marks<br /> if showValues then<br /> if type(showValues) == &quot;string&quot; then -- deserialize as table<br /> local keyValues = mw.text.split(showValues, &quot;%s*,%s*&quot;)<br /> showValues = {}<br /> for _, kv in ipairs(keyValues) do<br /> local key, value = mw.ustring.match(kv, &quot;^%s*(.-)%s*:%s*(.-)%s*$&quot;)<br /> if key then showValues[key] = value end<br /> end<br /> end<br /> <br /> local chartmarks = chartvis<br /> if chartmarks.marks then chartmarks = chartmarks.marks[1] end<br /> local textmarks = getTextMarks(chartmarks, chartType, outerRadius, scales, radiusScale, yType, showValues)<br /> if chartmarks ~= chartvis then<br /> table.insert(chartvis.marks, textmarks)<br /> else<br /> table.insert(marks, textmarks)<br /> end<br /> end<br /> <br /> -- symbol marks<br /> if chartType == &quot;line&quot; and showSymbols then<br /> local chartmarks = chartvis<br /> if chartmarks.marks then chartmarks = chartmarks.marks[1] end<br /> local symbolmarks = getSymbolMarks(chartmarks)<br /> if chartmarks ~= chartvis then<br /> table.insert(chartvis.marks, symbolmarks)<br /> else<br /> table.insert(marks, symbolmarks)<br /> end<br /> end<br /> <br /> -- axes<br /> local xAxis, yAxis = getAxes(xTitle, xAxisFormat, xAxisAngle, xType, xGrid, yTitle, yAxisFormat, yType, yGrid, chartType)<br /> <br /> -- legend<br /> local legend<br /> if legendTitle and tonumber(legendTitle) ~= 0 then legend = getLegend(legendTitle, chartType, outerRadius) end<br /> <br /> -- construct final output object<br /> local output =<br /> {<br /> version = 2,<br /> width = graphwidth,<br /> height = graphheight,<br /> data = { data, stats },<br /> scales = scales,<br /> axes = { xAxis, yAxis },<br /> marks = marks,<br /> legends = { legend }<br /> }<br /> <br /> local flags<br /> if formatJson then flags = mw.text.JSON_PRETTY end<br /> return mw.text.jsonEncode(output, flags)<br /> end<br /> <br /> function p.mapWrapper(frame)<br /> return p.map(frame:getParent())<br /> end<br /> <br /> function p.chartWrapper(frame)<br /> return p.chart(frame:getParent())<br /> end<br /> <br /> -- Given an HTML-encoded title as first argument, e.g. one produced with {{ARTICLEPAGENAME}},<br /> -- convert it into a properly URL path-encoded string<br /> -- This function is critical for any graph that uses path-based APIs, e.g. PageViews graph<br /> function p.encodeTitleForPath(frame)<br /> return mw.uri.encode(mw.text.decode(mw.text.trim(frame.args[1])), &#039;PATH&#039;)<br /> end<br /> <br /> return p</div> Pietrasagh