Skip to main content
Create new
Introduction
Reactivity
Props
Logic
Events
Bindings
Lifecycle
Stores
Motion
Transitions
Animations
Easing
SVG
Actions
Classes
Component composition
Context API
Special elements
Module context
Debugging
7GUIs
Miscellaneous
App.svelte
<svg width="300" height="100">
<!-- x axis -->
<line x1="0" x2="300" y1="100" y2="100"></line>
<g class="x" transform="translate(0,120)">
<text x="0">0</text>
<text x="60">2</text>
<text x="120">4</text>
<text x="180">6</text>
<text x="240">8</text>
<text x="300">10</text>
</g>
<!-- y axis -->
<line x1="0" x2="0" y1="0" y2="100"></line>
<g class="y" transform="translate(-10,0)">
<text y="100">0</text>
<text y="50">50</text>
<text y="0">100</text>
</g>
<!-- data -->
<polyline style="stroke: red; stroke-width: 2" points="
0,100
30,99
60,96
90,91
120,84
150,75
180,64
210,51
240,36
270,19
300,0
"></polyline>
</svg>

loading Svelte compiler...
import 'svelte/internal/disclose-version';
import 'svelte/internal/flags/legacy';
import * as $ from 'svelte/internal/client';

var root = $.ns_template(`<svg width="300" height="100" class="svelte-y8a6ye"><line x1="0" x2="300" y1="100" y2="100" class="svelte-y8a6ye"></line><g class="x svelte-y8a6ye" transform="translate(0,120)"><text x="0" class="svelte-y8a6ye">0</text><text x="60" class="svelte-y8a6ye">2</text><text x="120" class="svelte-y8a6ye">4</text><text x="180" class="svelte-y8a6ye">6</text><text x="240" class="svelte-y8a6ye">8</text><text x="300" class="svelte-y8a6ye">10</text></g><line x1="0" x2="0" y1="0" y2="100" class="svelte-y8a6ye"></line><g class="y svelte-y8a6ye" transform="translate(-10,0)"><text y="100" class="svelte-y8a6ye">0</text><text y="50" class="svelte-y8a6ye">50</text><text y="0" class="svelte-y8a6ye">100</text></g><polyline style="stroke: red; stroke-width: 2" points="
0,100
30,99
60,96
90,91
120,84
150,75
180,64
210,51
240,36
270,19
300,0
" class="svelte-y8a6ye"></polyline></svg>`);

export default function App($$anchor) {
var svg = root();

$.append($$anchor, svg);
}
result = svelte.compile(source, {
generate: ,
});

svg.svelte-y8a6ye {
overflow: visible;
margin: 3em;
}
line.svelte-y8a6ye, polyline.svelte-y8a6ye {
fill: none;
stroke: black;
}
.x.svelte-y8a6ye text:where(.svelte-y8a6ye) {
text-anchor: middle;
}
.y.svelte-y8a6ye text:where(.svelte-y8a6ye) {
text-anchor: end;
dominant-baseline: middle;
}

		
			
				
  • Root {
    • css: StyleSheet {...}
      • type: "StyleSheet"
      • start: 675
      • end: 895
      • attributes: []
      • children: [...] (4)
        • Rule {...}
          • type: "Rule"
          • prelude: SelectorList {...}
            • type: "SelectorList"
            • start: 684
            • end: 687
            • children: [...] (1)
              • ComplexSelector {...}
                • type: "ComplexSelector"
                • start: 684
                • end: 687
                • children: [...] (1)
                  • RelativeSelector {...}
                    • type: "RelativeSelector"
                    • combinator: null
                    • selectors: [...] (1)
                      • TypeSelector {...}
                        • type: "TypeSelector"
                        • name: "svg"
                        • start: 684
                        • end: 687
                        }
                      ]
                    • start: 684
                    • end: 687
                    }
                  ]
                }
              ]
            }
          • block: Block {...}
            • type: "Block"
            • start: 688
            • end: 728
            • children: [...] (2)
              • Declaration {...}
                • type: "Declaration"
                • start: 692
                • end: 709
                • property: "overflow"
                • value: "visible"
                }
              • Declaration {...}
                • type: "Declaration"
                • start: 713
                • end: 724
                • property: "margin"
                • value: "3em"
                }
              ]
            }
          • start: 684
          • end: 728
          }
        • Rule {...}
          • type: "Rule"
          • prelude: SelectorList {...}
            • type: "SelectorList"
            • start: 732
            • end: 746
            • children: [...] (2)
              • ComplexSelector {...}
                • type: "ComplexSelector"
                • start: 732
                • end: 736
                • children: [...] (1)
                  • RelativeSelector {...}
                    • type: "RelativeSelector"
                    • combinator: null
                    • selectors: [...] (1)
                      • TypeSelector {...}
                        • type: "TypeSelector"
                        • name: "line"
                        • start: 732
                        • end: 736
                        }
                      ]
                    • start: 732
                    • end: 736
                    }
                  ]
                }
              • ComplexSelector {...}
                • type: "ComplexSelector"
                • start: 738
                • end: 746
                • children: [...] (1)
                  • RelativeSelector {...}
                    • type: "RelativeSelector"
                    • combinator: null
                    • selectors: [...] (1)
                      • TypeSelector {...}
                        • type: "TypeSelector"
                        • name: "polyline"
                        • start: 738
                        • end: 746
                        }
                      ]
                    • start: 738
                    • end: 746
                    }
                  ]
                }
              ]
            }
          • block: Block {...}
            • type: "Block"
            • start: 747
            • end: 782
            • children: [...] (2)
              • Declaration {...}
                • type: "Declaration"
                • start: 751
                • end: 761
                • property: "fill"
                • value: "none"
                }
              • Declaration {...}
                • type: "Declaration"
                • start: 765
                • end: 778
                • property: "stroke"
                • value: "black"
                }
              ]
            }
          • start: 732
          • end: 782
          }
        • Rule {...}
          • type: "Rule"
          • prelude: SelectorList {...}
            • type: "SelectorList"
            • start: 786
            • end: 793
            • children: [...] (1)
              • ComplexSelector {...}
                • type: "ComplexSelector"
                • start: 786
                • end: 793
                • children: [...] (2)
                  • RelativeSelector {...}
                    • type: "RelativeSelector"
                    • combinator: null
                    • selectors: [...] (1)
                      • ClassSelector {...}
                        • type: "ClassSelector"
                        • name: "x"
                        • start: 786
                        • end: 788
                        }
                      ]
                    • start: 786
                    • end: 788
                    }
                  • RelativeSelector {...}
                    • type: "RelativeSelector"
                    • combinator: Combinator {...}
                      • type: "Combinator"
                      • name: " "
                      • start: 788
                      • end: 789
                      }
                    • selectors: [...] (1)
                      • TypeSelector {...}
                        • type: "TypeSelector"
                        • name: "text"
                        • start: 789
                        • end: 793
                        }
                      ]
                    • start: 788
                    • end: 793
                    }
                  ]
                }
              ]
            }
          • block: Block {...}
            • type: "Block"
            • start: 794
            • end: 821
            • children: [...] (1)
              • Declaration {...}
                • type: "Declaration"
                • start: 798
                • end: 817
                • property: "text-anchor"
                • value: "middle"
                }
              ]
            }
          • start: 786
          • end: 821
          }
        • Rule {...}
          • type: "Rule"
          • prelude: SelectorList {...}
            • type: "SelectorList"
            • start: 825
            • end: 832
            • children: [...] (1)
              • ComplexSelector {...}
                • type: "ComplexSelector"
                • start: 825
                • end: 832
                • children: [...] (2)
                  • RelativeSelector {...}
                    • type: "RelativeSelector"
                    • combinator: null
                    • selectors: [...] (1)
                      • ClassSelector {...}
                        • type: "ClassSelector"
                        • name: "y"
                        • start: 825
                        • end: 827
                        }
                      ]
                    • start: 825
                    • end: 827
                    }
                  • RelativeSelector {...}
                    • type: "RelativeSelector"
                    • combinator: Combinator {...}
                      • type: "Combinator"
                      • name: " "
                      • start: 827
                      • end: 828
                      }
                    • selectors: [...] (1)
                      • TypeSelector {...}
                        • type: "TypeSelector"
                        • name: "text"
                        • start: 828
                        • end: 832
                        }
                      ]
                    • start: 827
                    • end: 832
                    }
                  ]
                }
              ]
            }
          • block: Block {...}
            • type: "Block"
            • start: 833
            • end: 886
            • children: [...] (2)
              • Declaration {...}
                • type: "Declaration"
                • start: 837
                • end: 853
                • property: "text-anchor"
                • value: "end"
                }
              • Declaration {...}
                • type: "Declaration"
                • start: 857
                • end: 882
                • property: "dominant-baseline"
                • value: "middle"
                }
              ]
            }
          • start: 825
          • end: 886
          }
        ]
      • content: {...}
        • start: 682
        • end: 887
        • styles: "\n\tsvg {\n\t\toverflow: visible;\n\t\tmargin: 3em;\n\t}\n\t\n\tline, polyline {\n\t\tfill: none;\n\t\tstroke: black;\n\t}\n\t\n\t.x text {\n\t\ttext-anchor: middle;\n\t}\n\t\n\t.y text {\n\t\ttext-anchor: end;\n\t\tdominant-baseline: middle;\n\t}\n"
        • comment: null
        }
      }
    • js: []
    • start: 0
    • end: 673
    • type: "Root"
    • fragment: Fragment {...}
      • type: "Fragment"
      • nodes: [...] (2)
        • RegularElement {...}
          • type: "RegularElement"
          • start: 0
          • end: 673
          • name: "svg"
          • attributes: [...] (3)
            • Attribute {...}
              • type: "Attribute"
              • start: 5
              • end: 16
              • name: "width"
              • value: [...] (1)
                • Text {...}
                  • start: 12
                  • end: 15
                  • type: "Text"
                  • raw: "300"
                  • data: "300"
                  }
                ]
              }
            • Attribute {...}
              • type: "Attribute"
              • start: 17
              • end: 29
              • name: "height"
              • value: [...] (1)
                • Text {...}
                  • start: 25
                  • end: 28
                  • type: "Text"
                  • raw: "100"
                  • data: "100"
                  }
                ]
              }
            • Attribute {...}
              • type: "Attribute"
              • start: -1
              • end: -1
              • name: "class"
              • value: [...] (1)
                • Text {...}
                  • type: "Text"
                  • data: ""
                  • raw: ""
                  • start: -1
                  • end: -1
                  }
                ]
              }
            ]
          • fragment: Fragment {...}
            • type: "Fragment"
            • nodes: [...] (17)
              • Text {...}
                • type: "Text"
                • start: 30
                • end: 32
                • raw: "\n\t"
                • data: "\n\t"
                }
              • Comment {...}
                • type: "Comment"
                • start: 32
                • end: 47
                • data: " x axis "
                }
              • Text {...}
                • type: "Text"
                • start: 47
                • end: 49
                • raw: "\n\t"
                • data: "\n\t"
                }
              • RegularElement {...}
                • type: "RegularElement"
                • start: 49
                • end: 96
                • name: "line"
                • attributes: [...] (5)
                  • Attribute {...}
                    • type: "Attribute"
                    • start: 55
                    • end: 61
                    • name: "x1"
                    • value: [...] (1)
                      • Text {...}
                        • start: 59
                        • end: 60
                        • type: "Text"
                        • raw: "0"
                        • data: "0"
                        }
                      ]
                    }
                  • Attribute {...}
                    • type: "Attribute"
                    • start: 62
                    • end: 70
                    • name: "x2"
                    • value: [...] (1)
                      • Text {...}
                        • start: 66
                        • end: 69
                        • type: "Text"
                        • raw: "300"
                        • data: "300"
                        }
                      ]
                    }
                  • Attribute {...}
                    • type: "Attribute"
                    • start: 71
                    • end: 79
                    • name: "y1"
                    • value: [...] (1)
                      • Text {...}
                        • start: 75
                        • end: 78
                        • type: "Text"
                        • raw: "100"
                        • data: "100"
                        }
                      ]
                    }
                  • Attribute {...}
                    • type: "Attribute"
                    • start: 80
                    • end: 88
                    • name: "y2"
                    • value: [...] (1)
                      • Text {...}
                        • start: 84
                        • end: 87
                        • type: "Text"
                        • raw: "100"
                        • data: "100"
                        }
                      ]
                    }
                  • Attribute {...}
                    • type: "Attribute"
                    • start: -1
                    • end: -1
                    • name: "class"
                    • value: [...] (1)
                      • Text {...}
                        • type: "Text"
                        • data: ""
                        • raw: ""
                        • start: -1
                        • end: -1
                        }
                      ]
                    }
                  ]
                • fragment: Fragment {...}
                  • type: "Fragment"
                  • nodes: []
                  }
                }
              • Text {...}
                • type: "Text"
                • start: 96
                • end: 98
                • raw: " "
                • data: " "
                }
              • RegularElement {...}
                • type: "RegularElement"
                • start: 98
                • end: 294
                • name: "g"
                • attributes: [...] (2)
                  • Attribute {...}
                    • type: "Attribute"
                    • start: 101
                    • end: 110
                    • name: "class"
                    • value: [...] (1)
                      • Text {...}
                        • start: 108
                        • end: 109
                        • type: "Text"
                        • raw: "x"
                        • data: "x"
                        }
                      ]
                    }
                  • Attribute {...}
                    • type: "Attribute"
                    • start: 111
                    • end: 139
                    • name: "transform"
                    • value: [...] (1)
                      • Text {...}
                        • start: 122
                        • end: 138
                        • type: "Text"
                        • raw: "translate(0,120)"
                        • data: "translate(0,120)"
                        }
                      ]
                    }
                  ]
                • fragment: Fragment {...}
                  • type: "Fragment"
                  • nodes: [...] (13)
                    • Text {...}
                      • type: "Text"
                      • start: 140
                      • end: 143
                      • raw: "\n\t\t"
                      • data: "\n\t\t"
                      }
                    • RegularElement {...}
                      • type: "RegularElement"
                      • start: 143
                      • end: 163
                      • name: "text"
                      • attributes: [...] (2)
                        • Attribute {...}
                          • type: "Attribute"
                          • start: 149
                          • end: 154
                          • name: "x"
                          • value: [...] (1)
                            • Text {...}
                              • start: 152
                              • end: 153
                              • type: "Text"
                              • raw: "0"
                              • data: "0"
                              }
                            ]
                          }
                        • Attribute {...}
                          • type: "Attribute"
                          • start: -1
                          • end: -1
                          • name: "class"
                          • value: [...] (1)
                            • Text {...}
                              • type: "Text"
                              • data: ""
                              • raw: ""
                              • start: -1
                              • end: -1
                              }
                            ]
                          }
                        ]
                      • fragment: Fragment {...}
                        • type: "Fragment"
                        • nodes: [...] (1)
                          • Text {...}
                            • type: "Text"
                            • start: 155
                            • end: 156
                            • raw: "0"
                            • data: "0"
                            }
                          ]
                        }
                      }
                    • Text {...}
                      • type: "Text"
                      • start: 163
                      • end: 166
                      • raw: " "
                      • data: " "
                      }
                    • RegularElement {...}
                      • type: "RegularElement"
                      • start: 166
                      • end: 187
                      • name: "text"
                      • attributes: [...] (2)
                        • Attribute {...}
                          • type: "Attribute"
                          • start: 172
                          • end: 178
                          • name: "x"
                          • value: [...] (1)
                            • Text {...}
                              • start: 175
                              • end: 177
                              • type: "Text"
                              • raw: "60"
                              • data: "60"
                              }
                            ]
                          }
                        • Attribute {...}
                          • type: "Attribute"
                          • start: -1
                          • end: -1
                          • name: "class"
                          • value: [...] (1)
                            • Text {...}
                              • type: "Text"
                              • data: ""
                              • raw: ""
                              • start: -1
                              • end: -1
                              }
                            ]
                          }
                        ]
                      • fragment: Fragment {...}
                        • type: "Fragment"
                        • nodes: [...] (1)
                          • Text {...}
                            • type: "Text"
                            • start: 179
                            • end: 180
                            • raw: "2"
                            • data: "2"
                            }
                          ]
                        }
                      }
                    • Text {...}
                      • type: "Text"
                      • start: 187
                      • end: 190
                      • raw: " "
                      • data: " "
                      }
                    • RegularElement {...}
                      • type: "RegularElement"
                      • start: 190
                      • end: 212
                      • name: "text"
                      • attributes: [...] (2)
                        • Attribute {...}
                          • type: "Attribute"
                          • start: 196
                          • end: 203
                          • name: "x"
                          • value: [...] (1)
                            • Text {...}
                              • start: 199
                              • end: 202
                              • type: "Text"
                              • raw: "120"
                              • data: "120"
                              }
                            ]
                          }
                        • Attribute {...}
                          • type: "Attribute"
                          • start: -1
                          • end: -1
                          • name: "class"
                          • value: [...] (1)
                            • Text {...}
                              • type: "Text"
                              • data: ""
                              • raw: ""
                              • start: -1
                              • end: -1
                              }
                            ]
                          }
                        ]
                      • fragment: Fragment {...}
                        • type: "Fragment"
                        • nodes: [...] (1)
                          • Text {...}
                            • type: "Text"
                            • start: 204
                            • end: 205
                            • raw: "4"
                            • data: "4"
                            }
                          ]
                        }
                      }
                    • Text {...}
                      • type: "Text"
                      • start: 212
                      • end: 215
                      • raw: " "
                      • data: " "
                      }
                    • RegularElement {...}
                      • type: "RegularElement"
                      • start: 215
                      • end: 237
                      • name: "text"
                      • attributes: [...] (2)
                        • Attribute {...}
                          • type: "Attribute"
                          • start: 221
                          • end: 228
                          • name: "x"
                          • value: [...] (1)
                            • Text {...}
                              • start: 224
                              • end: 227
                              • type: "Text"
                              • raw: "180"
                              • data: "180"
                              }
                            ]
                          }
                        • Attribute {...}
                          • type: "Attribute"
                          • start: -1
                          • end: -1
                          • name: "class"
                          • value: [...] (1)
                            • Text {...}
                              • type: "Text"
                              • data: ""
                              • raw: ""
                              • start: -1
                              • end: -1
                              }
                            ]
                          }
                        ]
                      • fragment: Fragment {...}
                        • type: "Fragment"
                        • nodes: [...] (1)
                          • Text {...}
                            • type: "Text"
                            • start: 229
                            • end: 230
                            • raw: "6"
                            • data: "6"
                            }
                          ]
                        }
                      }
                    • Text {...}
                      • type: "Text"
                      • start: 237
                      • end: 240
                      • raw: " "
                      • data: " "
                      }
                    • RegularElement {...}
                      • type: "RegularElement"
                      • start: 240
                      • end: 262
                      • name: "text"
                      • attributes: [...] (2)
                        • Attribute {...}
                          • type: "Attribute"
                          • start: 246
                          • end: 253
                          • name: "x"
                          • value: [...] (1)
                            • Text {...}
                              • start: 249
                              • end: 252
                              • type: "Text"
                              • raw: "240"
                              • data: "240"
                              }
                            ]
                          }
                        • Attribute {...}
                          • type: "Attribute"
                          • start: -1
                          • end: -1
                          • name: "class"
                          • value: [...] (1)
                            • Text {...}
                              • type: "Text"
                              • data: ""
                              • raw: ""
                              • start: -1
                              • end: -1
                              }
                            ]
                          }
                        ]
                      • fragment: Fragment {...}
                        • type: "Fragment"
                        • nodes: [...] (1)
                          • Text {...}
                            • type: "Text"
                            • start: 254
                            • end: 255
                            • raw: "8"
                            • data: "8"
                            }
                          ]
                        }
                      }
                    • Text {...}
                      • type: "Text"
                      • start: 262
                      • end: 265
                      • raw: " "
                      • data: " "
                      }
                    • RegularElement {...}
                      • type: "RegularElement"
                      • start: 265
                      • end: 288
                      • name: "text"
                      • attributes: [...] (2)
                        • Attribute {...}
                          • type: "Attribute"
                          • start: 271
                          • end: 278
                          • name: "x"
                          • value: [...] (1)
                            • Text {...}
                              • start: 274
                              • end: 277
                              • type: "Text"
                              • raw: "300"
                              • data: "300"
                              }
                            ]
                          }
                        • Attribute {...}
                          • type: "Attribute"
                          • start: -1
                          • end: -1
                          • name: "class"
                          • value: [...] (1)
                            • Text {...}
                              • type: "Text"
                              • data: ""
                              • raw: ""
                              • start: -1
                              • end: -1
                              }
                            ]
                          }
                        ]
                      • fragment: Fragment {...}
                        • type: "Fragment"
                        • nodes: [...] (1)
                          • Text {...}
                            • type: "Text"
                            • start: 279
                            • end: 281
                            • raw: "10"
                            • data: "10"
                            }
                          ]
                        }
                      }
                    • Text {...}
                      • type: "Text"
                      • start: 288
                      • end: 290
                      • raw: "\n\t"
                      • data: "\n\t"
                      }
                    ]
                  }
                }
              • Text {...}
                • type: "Text"
                • start: 294
                • end: 298
                • raw: " "
                • data: " "
                }
              • Comment {...}
                • type: "Comment"
                • start: 298
                • end: 313
                • data: " y axis "
                }
              • Text {...}
                • type: "Text"
                • start: 313
                • end: 315
                • raw: ""
                • data: ""
                }
              • RegularElement {...}
                • type: "RegularElement"
                • start: 315
                • end: 358
                • name: "line"
                • attributes: [...] (5)
                  • Attribute {...}
                    • type: "Attribute"
                    • start: 321
                    • end: 327
                    • name: "x1"
                    • value: [...] (1)
                      • Text {...}
                        • start: 325
                        • end: 326
                        • type: "Text"
                        • raw: "0"
                        • data: "0"
                        }
                      ]
                    }
                  • Attribute {...}
                    • type: "Attribute"
                    • start: 328
                    • end: 334
                    • name: "x2"
                    • value: [...] (1)
                      • Text {...}
                        • start: 332
                        • end: 333
                        • type: "Text"
                        • raw: "0"
                        • data: "0"
                        }
                      ]
                    }
                  • Attribute {...}
                    • type: "Attribute"
                    • start: 335
                    • end: 341
                    • name: "y1"
                    • value: [...] (1)
                      • Text {...}
                        • start: 339
                        • end: 340
                        • type: "Text"
                        • raw: "0"
                        • data: "0"
                        }
                      ]
                    }
                  • Attribute {...}
                    • type: "Attribute"
                    • start: 342
                    • end: 350
                    • name: "y2"
                    • value: [...] (1)
                      • Text {...}
                        • start: 346
                        • end: 349
                        • type: "Text"
                        • raw: "100"
                        • data: "100"
                        }
                      ]
                    }
                  • Attribute {...}
                    • type: "Attribute"
                    • start: -1
                    • end: -1
                    • name: "class"
                    • value: [...] (1)
                      • Text {...}
                        • type: "Text"
                        • data: ""
                        • raw: ""
                        • start: -1
                        • end: -1
                        }
                      ]
                    }
                  ]
                • fragment: Fragment {...}
                  • type: "Fragment"
                  • nodes: []
                  }
                }
              • Text {...}
                • type: "Text"
                • start: 358
                • end: 360
                • raw: " "
                • data: " "
                }
              • RegularElement {...}
                • type: "RegularElement"
                • start: 360
                • end: 483
                • name: "g"
                • attributes: [...] (2)
                  • Attribute {...}
                    • type: "Attribute"
                    • start: 363
                    • end: 372
                    • name: "class"
                    • value: [...] (1)
                      • Text {...}
                        • start: 370
                        • end: 371
                        • type: "Text"
                        • raw: "y"
                        • data: "y"
                        }
                      ]
                    }
                  • Attribute {...}
                    • type: "Attribute"
                    • start: 373
                    • end: 401
                    • name: "transform"
                    • value: [...] (1)
                      • Text {...}
                        • start: 384
                        • end: 400
                        • type: "Text"
                        • raw: "translate(-10,0)"
                        • data: "translate(-10,0)"
                        }
                      ]
                    }
                  ]
                • fragment: Fragment {...}
                  • type: "Fragment"
                  • nodes: [...] (7)
                    • Text {...}
                      • type: "Text"
                      • start: 402
                      • end: 405
                      • raw: "\n\t\t"
                      • data: "\n\t\t"
                      }
                    • RegularElement {...}
                      • type: "RegularElement"
                      • start: 405
                      • end: 427
                      • name: "text"
                      • attributes: [...] (2)
                        • Attribute {...}
                          • type: "Attribute"
                          • start: 411
                          • end: 418
                          • name: "y"
                          • value: [...] (1)
                            • Text {...}
                              • start: 414
                              • end: 417
                              • type: "Text"
                              • raw: "100"
                              • data: "100"
                              }
                            ]
                          }
                        • Attribute {...}
                          • type: "Attribute"
                          • start: -1
                          • end: -1
                          • name: "class"
                          • value: [...] (1)
                            • Text {...}
                              • type: "Text"
                              • data: ""
                              • raw: ""
                              • start: -1
                              • end: -1
                              }
                            ]
                          }
                        ]
                      • fragment: Fragment {...}
                        • type: "Fragment"
                        • nodes: [...] (1)
                          • Text {...}
                            • type: "Text"
                            • start: 419
                            • end: 420
                            • raw: "0"
                            • data: "0"
                            }
                          ]
                        }
                      }
                    • Text {...}
                      • type: "Text"
                      • start: 427
                      • end: 430
                      • raw: " "
                      • data: " "
                      }
                    • RegularElement {...}
                      • type: "RegularElement"
                      • start: 430
                      • end: 452
                      • name: "text"
                      • attributes: [...] (2)
                        • Attribute {...}
                          • type: "Attribute"
                          • start: 436
                          • end: 442
                          • name: "y"
                          • value: [...] (1)
                            • Text {...}
                              • start: 439
                              • end: 441
                              • type: "Text"
                              • raw: "50"
                              • data: "50"
                              }
                            ]
                          }
                        • Attribute {...}
                          • type: "Attribute"
                          • start: -1
                          • end: -1
                          • name: "class"
                          • value: [...] (1)
                            • Text {...}
                              • type: "Text"
                              • data: ""
                              • raw: ""
                              • start: -1
                              • end: -1
                              }
                            ]
                          }
                        ]
                      • fragment: Fragment {...}
                        • type: "Fragment"
                        • nodes: [...] (1)
                          • Text {...}
                            • type: "Text"
                            • start: 443
                            • end: 445
                            • raw: "50"
                            • data: "50"
                            }
                          ]
                        }
                      }
                    • Text {...}
                      • type: "Text"
                      • start: 452
                      • end: 455
                      • raw: " "
                      • data: " "
                      }
                    • RegularElement {...}
                      • type: "RegularElement"
                      • start: 455
                      • end: 477
                      • name: "text"
                      • attributes: [...] (2)
                        • Attribute {...}
                          • type: "Attribute"
                          • start: 461
                          • end: 466
                          • name: "y"
                          • value: [...] (1)
                            • Text {...}
                              • start: 464
                              • end: 465
                              • type: "Text"
                              • raw: "0"
                              • data: "0"
                              }
                            ]
                          }
                        • Attribute {...}
                          • type: "Attribute"
                          • start: -1
                          • end: -1
                          • name: "class"
                          • value: [...] (1)
                            • Text {...}
                              • type: "Text"
                              • data: ""
                              • raw: ""
                              • start: -1
                              • end: -1
                              }
                            ]
                          }
                        ]
                      • fragment: Fragment {...}
                        • type: "Fragment"
                        • nodes: [...] (1)
                          • Text {...}
                            • type: "Text"
                            • start: 467
                            • end: 470
                            • raw: "100"
                            • data: "100"
                            }
                          ]
                        }
                      }
                    • Text {...}
                      • type: "Text"
                      • start: 477
                      • end: 479
                      • raw: "\n\t"
                      • data: "\n\t"
                      }
                    ]
                  }
                }
              • Text {...}
                • type: "Text"
                • start: 483
                • end: 487
                • raw: " "
                • data: " "
                }
              • Comment {...}
                • type: "Comment"
                • start: 487
                • end: 500
                • data: " data "
                }
              • Text {...}
                • type: "Text"
                • start: 500
                • end: 502
                • raw: ""
                • data: ""
                }
              • RegularElement {...}
                • type: "RegularElement"
                • start: 502
                • end: 666
                • name: "polyline"
                • attributes: [...] (3)
                  • Attribute {...}
                    • type: "Attribute"
                    • start: 512
                    • end: 548
                    • name: "style"
                    • value: [...] (1)
                      • Text {...}
                        • start: 519
                        • end: 547
                        • type: "Text"
                        • raw: "stroke: red; stroke-width: 2"
                        • data: "stroke: red; stroke-width: 2"
                        }
                      ]
                    }
                  • Attribute {...}
                    • type: "Attribute"
                    • start: 549
                    • end: 654
                    • name: "points"
                    • value: [...] (1)
                      • Text {...}
                        • start: 557
                        • end: 653
                        • type: "Text"
                        • raw: "\n\t\t0,100\n\t\t30,99\n\t\t60,96\n\t\t90,91\n\t\t120,84\n\t\t150,75\n\t\t180,64\n\t\t210,51\n\t\t240,36\n\t\t270,19\n\t\t300,0\n\t"
                        • data: "\n\t\t0,100\n\t\t30,99\n\t\t60,96\n\t\t90,91\n\t\t120,84\n\t\t150,75\n\t\t180,64\n\t\t210,51\n\t\t240,36\n\t\t270,19\n\t\t300,0\n\t"
                        }
                      ]
                    }
                  • Attribute {...}
                    • type: "Attribute"
                    • start: -1
                    • end: -1
                    • name: "class"
                    • value: [...] (1)
                      • Text {...}
                        • type: "Text"
                        • data: ""
                        • raw: ""
                        • start: -1
                        • end: -1
                        }
                      ]
                    }
                  ]
                • fragment: Fragment {...}
                  • type: "Fragment"
                  • nodes: []
                  }
                }
              • Text {...}
                • type: "Text"
                • start: 666
                • end: 667
                • raw: "\n"
                • data: "\n"
                }
              ]
            }
          }
        • Text {...}
          • type: "Text"
          • start: 673
          • end: 675
          • raw: "\n\n"
          • data: "\n\n"
          }
        ]
      }
    • options: null
    }
The AST is not public API and may change at any point in time
Simple line chart • Playground • Svelte