• Edit
  • Download
  • <!DOCTYPE html>
    <html>
    
    <head>
      <meta charset="utf-8">
      <title>ZingSoft Demo</title>
      <script nonce="undefined" src="https://cdn.zingchart.com/zingchart.min.js"></script>
      <style>
        html,
        body {
          margin: 0;
          padding: 0;
          width: 100%;
          height: 100%;
        }
    
        .chart--container {
          min-height: 150px;
          width: 100%;
          height: 100%;
        }
    
        .zc-ref {
          display: none;
        }
      </style>
    </head>
    
    <body>
      <!-- CHART CONTAINER -->
      <div id="myChart" class="chart--container">
        <a class="zc-ref" href="https://www.zingchart.com/">Powered by ZingChart</a>
      </div>
      <script>
        ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "b55b025e438fa8a98e32482b5f768ff5"]; // window.onload event for Javascript to run after HTML
        // because this Javascript is injected into the document head
        window.addEventListener('load', () => {
          // Javascript code to execute after DOM content
          zingchart.loadModules('patterns');
    
          // full ZingChart schema can be found here:
          // https://www.zingchart.com/docs/api/json-configuration/
          let chartConfig = {
            type: 'bar',
            globals: {
              fontSize: '14px'
            },
            title: {
              text: 'OpenAI Model Veracity',
              fontSize: '24px'
            },
            legend: {
              draggable: true
            },
            layout: {
              'padding-left': '40px'
            },
            plotarea: {
              marginLeft: '120px'
            },
            // plot represents general series, or plots, styling
            plot: {
              barSpace: 0,
              stacked: false,
              // hoverstate
              tooltip: {
                // % symbol represents a token to insert a value. Full list here:
                // https://www.zingchart.com/docs/tutorials/chart-elements/zingchart-tokens/
                text: '%v% %t (%kt)',
                borderRadius: '3px',
                htmlMode: true
              },
              // animation docs here:
              // https://www.zingchart.com/docs/tutorials/design-and-styling/chart-animation/#animation__effect
              animation: {
                effect: 'ANIMATION_EXPAND_BOTTOM',
                method: 'ANIMATION_STRONG_EASE_OUT',
                sequence: 'ANIMATION_BY_NODE',
                speed: 275
              }
            },
            scaleX: {
              // set scale label
              label: {
                text: 'Model Name'
              },
              // convert text on scale indices
              labels: ['GPT-4o mini', 'o1-preview', 'GPT-4o', 'o1-mini']
            },
            scaleY: {
              // scale label with unicode character
              label: {
                text: 'Percentage'
              },
              format: '%v%'
            },
            // plot values
            series: [{
                text: 'Correct',
                values: [8.6, 8.1, 38.2, 42.7],
                backgroundColor: '#34ab50',
              },
              {
                text: 'Incorrect',
                values: [90.5, 63.4, 60.8, 48.0],
                backgroundColor: '#bf4744',
              },
              {
                text: 'Not Attempted',
                values: [0.9, 28.5, 1.0, 9.2],
                backgroundColor: 'lightgray',
              }
            ]
          };
    
          // render chart
          zingchart.render({
            id: 'myChart',
            data: chartConfig,
            height: '100%',
            width: '100%',
          });
        });
      </script>
    </body>
    
    </html>
    <!DOCTYPE html>
    <html>
    
    <head>
      <meta charset="utf-8">
      <title>ZingSoft Demo</title>
      <script src="https://cdn.zingchart.com/zingchart.min.js"></script>
    </head>
    
    <body>
      <!-- CHART CONTAINER -->
      <div id="myChart" class="chart--container">
        <a class="zc-ref" href="https://www.zingchart.com/">Powered by ZingChart</a>
      </div>
    </body>
    
    </html>
    html,
    body {
      margin: 0;
      padding: 0;
      width: 100%;
      height: 100%;
    }
    
    .chart--container {
      min-height: 150px;
      width: 100%;
      height: 100%;
    }
    
    .zc-ref {
      display: none;
    }
    // window.onload event for Javascript to run after HTML
    // because this Javascript is injected into the document head
    window.addEventListener('load', () => {
      // Javascript code to execute after DOM content
      zingchart.loadModules('patterns');
    
      // full ZingChart schema can be found here:
      // https://www.zingchart.com/docs/api/json-configuration/
      let chartConfig = {
        type: 'bar',
        globals: {
          fontSize: '14px'
        },
        title: {
          text: 'OpenAI Model Veracity',
          fontSize: '24px'
        },
        legend: {
          draggable: true
        },
        layout: {
          'padding-left': '40px'
        },
        plotarea: {
          marginLeft: '120px'
        },
        // plot represents general series, or plots, styling
        plot: {
          barSpace: 0,
          stacked: false,
          // hoverstate
          tooltip: {
            // % symbol represents a token to insert a value. Full list here:
            // https://www.zingchart.com/docs/tutorials/chart-elements/zingchart-tokens/
            text: '%v% %t (%kt)',
            borderRadius: '3px',
            htmlMode: true
          },
          // animation docs here:
          // https://www.zingchart.com/docs/tutorials/design-and-styling/chart-animation/#animation__effect
          animation: {
            effect: 'ANIMATION_EXPAND_BOTTOM',
            method: 'ANIMATION_STRONG_EASE_OUT',
            sequence: 'ANIMATION_BY_NODE',
            speed: 275
          }
        },
        scaleX: {
          // set scale label
          label: {
            text: 'Model Name'
          },
          // convert text on scale indices
          labels: ['GPT-4o mini', 'o1-preview', 'GPT-4o', 'o1-mini']
        },
        scaleY: {
          // scale label with unicode character
          label: {
            text: 'Percentage'
          },
          format: '%v%'
        },
        // plot values
        series: [{
            text: 'Correct',
            values: [8.6, 8.1, 38.2, 42.7],
            backgroundColor: '#34ab50',
          },
          {
            text: 'Incorrect',
            values: [90.5, 63.4, 60.8, 48.0],
            backgroundColor: '#bf4744',
          },
          {
            text: 'Not Attempted',
            values: [0.9, 28.5, 1.0, 9.2],
            backgroundColor: 'lightgray',
          }
        ]
      };
    
      // render chart
      zingchart.render({
        id: 'myChart',
        data: chartConfig,
        height: '100%',
        width: '100%',
      });
    });