Add a chart to website

please help me How to add all kinds of charts to my website
bar chart or circle chart

I am sure there are plenty of packages out there which can help you to build charts.

A simple search (query: css charts) with google gives plenty of results, from pre-made easy to use packages to entire tutorials on how to build your own charts

I know how to create a chart but I do not know how to add it to my website

Then you really need to provide more information. Do you use word-press? Wix? do you have a custom website? All that information and anything else you can think of that might be useful should be included. This way, we can help you much better.

I want to build a website for Self-assessment and I write my codes in Atom Then I open it in Firefox

What is then the problem? That means you build from scratch, so you can include whatever you need

My problem is that when I add my chart code to my website code in Atom, the chart does not run in Firefax

<!DOCTYPE html>
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="./resources/css/azade.css" rel="stylesheet" type="text/css">
    <link rel="stylesheet" href="">
    <script src=""></script>
    <div id="bar">Analysis and training of financial markets by experienced professors</div>

      <form action="/action_page.php" id="form">
        <label for="name"> search:</label>
        <input type="search" id="name" name="name" placeholder="search Name of symbol or company">
        <input type="button" value="log in">
        <input type="button" value="Membership">
        <nav id="nav" class="item">
                <li><a href="">Market maps</a></li>
                <li><a href="">Indicators</a></li>
                <li><a href="">Filter</a></li>
                <li><a href="">About</a></li>
                <li><a href="">Clients</a></li>
                <li><a href="">Contact</a></li>
                <li><a href="">Education</a></li>

        <div class="banner">
            <div id="banner1" class='ban'>
             <a href="#" class='button' id="start" >Start</a>
            <div id="banner2" class='ban'>
            <a href="#" class='button' id="run" >Run</a>
    <svg width="600" height="500"></svg>
      var svg="svg"),
      margin = 100,
      width = svg.attr("width") - margin,
      height = svg.attr("height") - margin;
      var xscale= d3.scaleBand().range([0 ,width]).padding(1.0),
      yscale= d3.scaleLinear().range([height,0]);
      var g = svg.append("g")
      .attr("transform", "translate(" + 100 + "," + 100 + ")");
      d3.csv("/data/xyz.csv", function(data) {
        for (var i = 0; i < data.length; i++) {
        xScale.domain( { return d.year; }));
        yScale.domain([0, d3.max(data, function(d) { return d.value; })]);
       .attr("transform", "translate(0," + height + ")")

           return "$" + d;
       .attr("y", 6)
       .attr("dy", "0.71em")
       .attr("text-anchor", "end")
        <div class="left">
            <p>Address: Ma'ali Abad, Alley 9, Unique Building, Unit 30</p>
        <div class="right">
        <div class="phone">
            <i class="fa fa-phone"></i>
            <a href="tel:09362952770">09362952770</a>
        <div class="email">
            <i class="fa fa-envelope"></i>
            <a href="email:azadesohrabi9170@gmail"></a>
        <div class="instagram">
            <i class="fa fa-instagram"></i>
            <a href="instagram:azadesohrabi">@azadesohrabi</a>
        <div class="telegram">
            <i class="fa fa-telegram"></i>
            <a href="">@EWbroadcast</a>

In firefox, open your console (f12 or right click -> inspect element -> console tab)

the console gives you your JavaScript errors, you have a JavaScript (syntax) error.

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.