<!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: 'hbar',
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: {
stacked: true,
'stack-type': "100%",
// 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: ['o1-preview', 'GPT-4o', 'o1-mini', 'GPT-4o mini']
},
scaleY: {
// scale label with unicode character
label: {
text: 'Percentage'
},
format: '%v%'
},
// plot values
series: [{
text: 'Correct',
values: [42.7, 38.2, 8.1, 8.6],
backgroundColor: 'rgb(92, 97, 242)',
'background-image': 'PATTERN_ZIGZAG'
},
{
text: 'Not Attempted',
values: [9.2, 1.0, 28.5, 0.9],
backgroundColor: 'rgb(52, 54, 85)',
'background-image': 'PATTERN_DASHED_UPWARD_DIAGONAL'
},
{
text: 'Incorrect',
values: [48.0, 60.8, 63.4, 90.5],
backgroundColor: 'rgb(219, 220, 237)',
'background-image': 'PATTERN_DOTTED_DIAMOND'
}
]
};
// 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: 'hbar',
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: {
stacked: true,
'stack-type': "100%",
// 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: ['o1-preview', 'GPT-4o', 'o1-mini', 'GPT-4o mini']
},
scaleY: {
// scale label with unicode character
label: {
text: 'Percentage'
},
format: '%v%'
},
// plot values
series: [{
text: 'Correct',
values: [42.7, 38.2, 8.1, 8.6],
backgroundColor: 'rgb(92, 97, 242)',
'background-image': 'PATTERN_ZIGZAG'
},
{
text: 'Not Attempted',
values: [9.2, 1.0, 28.5, 0.9],
backgroundColor: 'rgb(52, 54, 85)',
'background-image': 'PATTERN_DASHED_UPWARD_DIAGONAL'
},
{
text: 'Incorrect',
values: [48.0, 60.8, 63.4, 90.5],
backgroundColor: 'rgb(219, 220, 237)',
'background-image': 'PATTERN_DOTTED_DIAMOND'
}
]
};
// render chart
zingchart.render({
id: 'myChart',
data: chartConfig,
height: '100%',
width: '100%',
});
});