Download web/AnyChart/line/chart_0042_line.html from chartact-benchmark/ChartAct: direct link, hf CLI and curl.
- Browser
- Download file 3.2 kB
-
https://huggingface.co/datasets/chartact-benchmark/ChartAct/resolve/main/web/AnyChart/line/chart_0042_line.html
- Command line
-
hf download hf://datasets/chartact-benchmark/ChartAct/web/AnyChart/line/chart_0042_line.html
-
curl -L -o chart_0042_line.html https://huggingface.co/datasets/chartact-benchmark/ChartAct/resolve/main/web/AnyChart/line/chart_0042_line.html
3.2 kB
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta content="IE=edge" http-equiv="X-UA-Compatible"> | |
| <meta content="width=device-width, initial-scale=1" name="viewport"> | |
| <title>AS Strokes and Lines 01</title> | |
| <link href="https://playground.anychart.com/docs/samples/AS_Strokes_and_Lines_01/iframe" rel="canonical"> | |
| <meta content="Line Chart,Spline Area Chart,Spline Chart,Step Line Chart" name="keywords"> | |
| <meta content="AnyChart - JavaScript Charts designed to be embedded and integrated" name="description"> | |
| <!--[if lt IE 9]> | |
| <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script> | |
| <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> | |
| <![endif]--> | |
| <link href="_deps/cdn.anychart.com/releases/8.14.1/css/anychart-ui.min_qe95e7e741b.css" rel="stylesheet" type="text/css"> | |
| <style>html, body, #container { | |
| width: 100%; | |
| height: 100%; | |
| margin: 0; | |
| padding: 0; | |
| }</style> | |
| </head> | |
| <body> | |
| <div id="container"></div> | |
| <script src="_deps/cdn.anychart.com/releases/8.14.1/js/anychart-base.min_qe95e7e741b.js"></script> | |
| <script src="_deps/cdn.anychart.com/releases/8.14.1/js/anychart-exports.min_qe95e7e741b.js"></script> | |
| <script src="_deps/cdn.anychart.com/releases/8.14.1/js/anychart-ui.min_qe95e7e741b.js"></script> | |
| <script type="text/javascript">anychart.onDocumentReady(function () { | |
| // chart type | |
| var chart = anychart.line(); | |
| // title | |
| chart.title("Sample Line Settings"); | |
| // data | |
| var data = anychart.data.set([ | |
| ["P1", 1, 6, -7, -6], | |
| ["P2", 3, 4, -4, -1], | |
| ["P3", 2, 5, -2, 1], | |
| ["P4", 4, 3.4, -4, 1], | |
| ["P5", 6, 6.8, 2, 3] | |
| ]); | |
| // set first series data | |
| var line = chart.line(data.mapAs({x: 0, value: 1})); | |
| // set stroke thickness 5px and stroke color as red | |
| line.stroke("5 red"); | |
| // stroke settings for mouse over the series | |
| line.hovered().stroke("5 red"); | |
| // set series name | |
| line.name("Solid Stroke Color"); | |
| // set data into second series | |
| var spline = chart.spline(data.mapAs({x: 0, value: 2})); | |
| // set stroke thickness 5px, stroke color green and stroke opacity 0.4 | |
| spline.stroke("5 green 0.4"); | |
| // stroke settings for mouse over the series | |
| spline.hovered().stroke("5 #006600 0.4"); | |
| // set series name | |
| spline.name("Solid Color with Opacity"); | |
| // set data into third series | |
| var step = chart.stepLine(data.mapAs({x: 0, value: 3})); | |
| // set stroke thickness 5px and apply gradient colors | |
| step.stroke({ | |
| keys: [".1 red", ".5 blue", ".9 green"], | |
| thickness: 5 | |
| }); | |
| // disable marker on mouse over | |
| step.hovered().markers(false); | |
| // set series name | |
| step.name("Gradient Color"); | |
| // set data into forth series | |
| var area = chart.splineArea(data.mapAs({x: 0, value: 4})); | |
| area.stroke({ | |
| // stroke color | |
| color: "darkblue", | |
| // dash settings | |
| dash: "5 2 5", | |
| // stroke thickness | |
| thickness: 3} | |
| ); | |
| area.hovered().stroke({ | |
| // stroke color | |
| color: "darkblue", | |
| // dash settings | |
| dash: "5 2 5", | |
| // stroke thickness | |
| thickness: 3 | |
| }); | |
| area.fill("gold 0.4"); | |
| area.name("Dashed Stroke"); | |
| // draw | |
| chart.container("container").draw(); | |
| });</script> | |
| </body> | |
| </html> |