Site Web

D3.js

Généralités

Représentation de la température

Représentation des chocs

Extensions

  • DC.js Tutorial link

    → Tutoriel sur la librairie DC.js basée sur D3.js et Crossfilter pour l’analyse de grand jeux de données multidimensionnels

Dashboard

Accès système de fichier local

  • How to save a file link

  • How to Save a File With JavaScript link

  • Getting Started With the File System Access API link

  • Exemple de page html sauvegardant la date dans un fichier mais en passant obligatoirement par un filepicker (exemple généré avec ChatGPT) :

    save-date.html
    <!DOCTYPE html>
    <html>
      <head>
        <title>Save Date to File</title>
      </head>
      <body>
        <h1>Enter Date to Save to File</h1>
        <form>
          <label for="date">Date:</label>
          <input type="date" id="date" name="date"><br><br>
          <label>
            <input type="checkbox" id="use_current_date" name="use_current_date"> Use Current Date
          </label><br><br>
          <button type="button" onclick="saveDate()">Save Date</button>
        </form>
        <script src="https://cdn.jsdelivr.net/npm/@use-strict/file-system-access@1.0.0/dist/index.min.js"></script>
        <script>
          async function saveDate() {
            // Get the user-entered date or the current date if the checkbox is checked
            var date;
            if (document.getElementById("use_current_date").checked) {
              date = new Date().toISOString().slice(0, 10);
            } else {
              date = document.getElementById("date").value;
            }
    
            // Use the ponyfill to prompt the user to choose a file to save to
            const fileHandle = await window.showSaveFilePicker({
              types: [
                {
                  description: 'Text file',
                  accept: {
                    'text/plain': ['.txt'],
                  },
                },
              ],
            });
    
            // Use the file handle to create a writable file stream
            const writable = await fileHandle.createWritable();
    
            // Write the date to the file and close the stream
            await writable.write(date);
            await writable.close();
    
            // Display a message indicating that the date was saved
            alert("Date saved to file!");
          }
        </script>
      </body>
    </html>

🞄  🞄  🞄