<commit_before>﻿<html>
<head>
<title>Chart 2D labels</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
	@import "../../../dojo/resources/dojo.css";
	@import "../../../dijit/tests/css/dijitTests.css";
</style>
<!--
The next line should include Microsoft's Silverligth.js, if you plan to use the silverlight backend
<script type="text/javascript" src="Silverlight.js"></script>
-->
<script type="text/javascript" src="../../../dojo/dojo.js" djConfig="isDebug: true"></script>
<script type="text/javascript" src="../../lang/functional.js"></script>
<script type="text/javascript" src="../../lang/utils.js"></script>
<script type="text/javascript" src="../Theme.js"></script>
<script type="text/javascript" src="../scaler/linear.js"></script>
<script type="text/javascript" src="../Element.js"></script>
<script type="text/javascript" src="../axis2d/common.js"></script>
<script type="text/javascript" src="../axis2d/Base.js"></script>
<script type="text/javascript" src="../axis2d/Default.js"></script>
<script type="text/javascript" src="../plot2d/common.js"></script>
<script type="text/javascript" src="../plot2d/Base.js"></script>
<script type="text/javascript" src="../plot2d/Default.js"></script>
<script type="text/javascript" src="../plot2d/Lines.js"></script>
<script type="text/javascript" src="../plot2d/Areas.js"></script>
<script type="text/javascript" src="../plot2d/Markers.js"></script>
<script type="text/javascript" src="../plot2d/MarkersOnly.js"></script>
<script type="text/javascript" src="../plot2d/Stacked.js"></script>
<script type="text/javascript" src="../plot2d/StackedLines.js"></script>
<script type="text/javascript" src="../plot2d/StackedAreas.js"></script>
<script type="text/javascript" src="../plot2d/Columns.js"></script>
<script type="text/javascript" src="../plot2d/StackedColumns.js"></script>
<script type="text/javascript" src="../plot2d/ClusteredColumns.js"></script>
<script type="text/javascript" src="../plot2d/Bars.js"></script>
<script type="text/javascript" src="../plot2d/StackedBars.js"></script>
<script type="text/javascript" src="../plot2d/ClusteredBars.js"></script>
<script type="text/javascript" src="../plot2d/Grid.js"></script>
<script type="text/javascript" src="../plot2d/Pie.js"></script>
<script type="text/javascript" src="../Chart2D.js"></script>
<script type="text/javascript">

dojo.require("dojox.charting.Chart2D");
dojo.require("dojox.charting.themes.PlotKit.blue");
dojo.require("dojox.charting.themes.PlotKit.cyan");
dojo.require("dojox.charting.themes.PlotKit.green");
dojo.require("dojox.charting.themes.PlotKit.orange");
dojo.require("dojox.charting.themes.PlotKit.purple");
dojo.require("dojox.charting.themes.PlotKit.red");

makeObjects = function(){
	var chart1 = new dojox.charting.Chart2D("test1");
	chart1.addAxis("x", {fixLower: "major", fixUpper: "major", includeZero: true});
	chart1.addAxis("y", {vertical: true, fixLower: "major", fixUpper: "major", natural: true});
	chart1.addPlot("default", {type: "Bars"});
	chart1.addSeries("Series A", [1, 2, 3, 4, 5], {stroke: {color: "red"}, fill: "lightpink"});
	chart1.addSeries("Series B", [5, 4, 3, 2, 1], {stroke: {color: "blue"}, fill: "lightblue"});
	chart1.render();
	
	var chart2 = new dojox.charting.Chart2D("test2");
	chart2.addAxis("x", {
		fixLower: "major", fixUpper: "major", includeZero: true, 
		labels: [
			//{value: 0, text: "zero"},
			{value: 2, text: "two"},
			{value: 4, text: "four"}
		]
	});
	chart2.addAxis("y", {
		vertical: true, fixLower: "major", fixUpper: "major", natural: true,
		labels: [{value: 0, text: ""},
			{value: 1, text: "Jan"}, {value: 2, text: "Feb"},
			{value: 3, text: "Mar"}, {value: 4, text: "Apr"},
			{value: 5, text: "May"}, {value: 6, text: "Jun"}]
	});
	chart2.addPlot("default", {type: "Bars"});
	chart2.addSeries("Series A", [1, 2, 3, 4, 5], {stroke: {color: "red"}, fill: "lightpink"});
	chart2.addSeries("Series B", [5, 4, 3, 2, 1], {stroke: {color: "blue"}, fill: "lightblue"});
	chart2.render();

	
	var chart3 = new dojox.charting.Chart2D("test3");
	chart3.addAxis("x", {
		fixLower: "major", fixUpper: "major", includeZero: true, 
		labels: [{value: 0, text: "z e r o"}, {value: 2, text: "t w o"}, {value: 4, text: "f o u r"}]
	});
	chart3.addAxis("y", {
		vertical: true, fixLower: "major", fixUpper: "major", natural: true,
		labels: [{value: 0, text: ""},
			{value: 1, text: "J A N"}, {value: 2, text: "F E B"},
			{value: 3, text: "M A R"}, {value: 4, text: "A P R"},
			{value: 5, text: "M A Y"}, {value: 6, text: "J U N"}]
	});
	chart3.addPlot("default", {type: "Bars"});
	chart3.addSeries("Series A", [1, 2, 3, 4, 5], {stroke: {color: "red"}, fill: "lightpink"});
	chart3.addSeries("Series B", [5, 4, 3, 2, 1], {stroke: {color: "blue"}, fill: "lightblue"});
	chart3.render();
};

dojo.addOnLoad(makeObjects);

</script>
</head>
<body>
<h1>Chart 2D labels</h1>
<!--<p><button onclick="makeObjects();">Go</button></p>-->
<p>1: Bars, axes aligned on major ticks, no minor ticks, custom strokes and fills.</p>
<div id="test1" style="width: 200px; height: 200px;"></div>
<p>2: Bars, axes aligned on major ticks, no minor ticks, custom strokes and fills, custom labels.</p>
<div id="test2" style="width: 200px; height: 200px;"></div>
<p>3: Bars, axes aligned on major ticks, no minor ticks, custom strokes and fills, custom labels with spaces.</p>
<div id="test3" style="width: 200px; height: 200px;"></div>
<p>That's all Folks!</p>
</body>
</html><commit_msg>add another chart but try to optimize for readability this time<commit_after>﻿<html>
<head>
<title>Chart 2D labels</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
	@import "../../../dojo/resources/dojo.css";
	@import "../../../dijit/tests/css/dijitTests.css";
</style>
<!--
The next line should include Microsoft's Silverligth.js, if you plan to use the silverlight backend
<script type="text/javascript" src="Silverlight.js"></script>
-->
<script type="text/javascript" src="../../../dojo/dojo.js" djConfig="isDebug: true"></script>
<script type="text/javascript" src="../../lang/functional.js"></script>
<script type="text/javascript" src="../../lang/utils.js"></script>
<script type="text/javascript" src="../Theme.js"></script>
<script type="text/javascript" src="../scaler/linear.js"></script>
<script type="text/javascript" src="../Element.js"></script>
<script type="text/javascript" src="../axis2d/common.js"></script>
<script type="text/javascript" src="../axis2d/Base.js"></script>
<script type="text/javascript" src="../axis2d/Default.js"></script>
<script type="text/javascript" src="../plot2d/common.js"></script>
<script type="text/javascript" src="../plot2d/Base.js"></script>
<script type="text/javascript" src="../plot2d/Default.js"></script>
<script type="text/javascript" src="../plot2d/Lines.js"></script>
<script type="text/javascript" src="../plot2d/Areas.js"></script>
<script type="text/javascript" src="../plot2d/Markers.js"></script>
<script type="text/javascript" src="../plot2d/MarkersOnly.js"></script>
<script type="text/javascript" src="../plot2d/Stacked.js"></script>
<script type="text/javascript" src="../plot2d/StackedLines.js"></script>
<script type="text/javascript" src="../plot2d/StackedAreas.js"></script>
<script type="text/javascript" src="../plot2d/Columns.js"></script>
<script type="text/javascript" src="../plot2d/StackedColumns.js"></script>
<script type="text/javascript" src="../plot2d/ClusteredColumns.js"></script>
<script type="text/javascript" src="../plot2d/Bars.js"></script>
<script type="text/javascript" src="../plot2d/StackedBars.js"></script>
<script type="text/javascript" src="../plot2d/ClusteredBars.js"></script>
<script type="text/javascript" src="../plot2d/Grid.js"></script>
<script type="text/javascript" src="../plot2d/Pie.js"></script>
<script type="text/javascript" src="../Chart2D.js"></script>
<script type="text/javascript">

dojo.require("dojox.charting.Chart2D");
dojo.require("dojox.charting.themes.PlotKit.blue");
dojo.require("dojox.charting.themes.PlotKit.cyan");
dojo.require("dojox.charting.themes.PlotKit.green");
dojo.require("dojox.charting.themes.PlotKit.orange");
dojo.require("dojox.charting.themes.PlotKit.purple");
dojo.require("dojox.charting.themes.PlotKit.red");

makeObjects = function(){
	var chart1 = new dojox.charting.Chart2D("test1");
	chart1.addAxis("x", {fixLower: "major", fixUpper: "major", includeZero: true});
	chart1.addAxis("y", {vertical: true, fixLower: "major", fixUpper: "major", natural: true});
	chart1.addPlot("default", {type: "Bars"});
	chart1.addSeries("Series A", [1, 2, 3, 4, 5], {stroke: {color: "red"}, fill: "lightpink"});
	chart1.addSeries("Series B", [5, 4, 3, 2, 1], {stroke: {color: "blue"}, fill: "lightblue"});
	chart1.render();
	
	var chart2 = new dojox.charting.Chart2D("test2");
	chart2.addAxis("x", {
		fixLower: "major", fixUpper: "major", includeZero: true, 
		labels: [
			//{value: 0, text: "zero"},
			{value: 2, text: "two"},
			{value: 4, text: "four"}
		]
	});
	chart2.addAxis("y", {
		vertical: true, fixLower: "major", fixUpper: "major", natural: true,
		labels: [{value: 0, text: ""},
			{value: 1, text: "Jan"}, {value: 2, text: "Feb"},
			{value: 3, text: "Mar"}, {value: 4, text: "Apr"},
			{value: 5, text: "May"}, {value: 6, text: "Jun"}]
	});
	chart2.addPlot("default", {type: "Bars"});
	chart2.addSeries("Series A", [1, 2, 3, 4, 5], {stroke: {color: "red"}, fill: "lightpink"});
	chart2.addSeries("Series B", [5, 4, 3, 2, 1], {stroke: {color: "blue"}, fill: "lightblue"});
	chart2.render();

	
	var chart3 = new dojox.charting.Chart2D("test3");
	chart3.addAxis("x", {
		fixLower: "major", fixUpper: "major", includeZero: true, 
		labels: [{value: 0, text: "z e r o"}, {value: 2, text: "t w o"}, {value: 4, text: "f o u r"}]
	});
	chart3.addAxis("y", {
		vertical: true, fixLower: "major", fixUpper: "major", natural: true,
		labels: [{value: 0, text: ""},
			{value: 1, text: "J A N"}, {value: 2, text: "F E B"},
			{value: 3, text: "M A R"}, {value: 4, text: "A P R"},
			{value: 5, text: "M A Y"}, {value: 6, text: "J U N"}]
	});
	chart3.addPlot("default", {type: "Bars"});
	chart3.addSeries("Series A", [1, 2, 3, 4, 5], {stroke: {color: "red"}, fill: "lightpink"});
	chart3.addSeries("Series B", [5, 4, 3, 2, 1], {stroke: {color: "blue"}, fill: "lightblue"});
	chart3.render();
	
	var chart4 = new dojox.charting.Chart2D("test4");
	chart4.addAxis("x", {
		majorLabels: false,
		includeZero: true, 
		minorTicks: false, 
		microTicks: false, 
		majorTick: { length: 0 }
	});
	chart4.addAxis("y", {
		vertical: true, 
		fixLower: "none", 
		fixUpper: "none", 
		natural: true,
		majorTick: { length: 3 },
		labels: [
			{value: 0, text: ""},
			{value: 1, text: "January"}, 
			{value: 2, text: "Febuary"},
			{value: 3, text: "March"}, 
			{value: 4, text: "April"},
			{value: 5, text: "May"}, 
		]
	});
	chart4.addPlot("default", { type: "Bars", gap: 3 });
	chart4.addSeries(
		"Series A", 
		[ 1, 6, 9, 4, 5, 2 ],
		{
			stroke: { width: 0, }, 
			// fill: "#ffcc2d",
			fill: {
				type: "linear",
				x1: 0, y1: 0,
				x2: 150, y2: 0,
				colors: [
					{ offset: 0,   color: "#ffe495" },
					{ offset: 1,   color: "#ffcc2d" }
				]
			}
		}
	);
	chart4.render();
};

dojo.addOnLoad(makeObjects);

</script>
</head>
<body>
<h1>Chart 2D labels</h1>
<!--<p><button onclick="makeObjects();">Go</button></p>-->
<p>1: Bars, axes aligned on major ticks, no minor ticks, custom strokes and fills.</p>
<div id="test1" style="width: 200px; height: 200px;"></div>
<p>2: Bars, axes aligned on major ticks, no minor ticks, custom strokes and fills, custom labels.</p>
<div id="test2" style="width: 200px; height: 200px;"></div>
<p>3: Bars, axes aligned on major ticks, no minor ticks, custom strokes and fills, custom labels with spaces.</p>
<div id="test3" style="width: 200px; height: 200px;"></div>
<p>4: Trying to make it look good</p>
<div id="test4" style="width: 200px; height: 200px;"></div>
<p>That's all Folks!</p>
</body>
</html>
{'fraction_non_alphanumeric': 0.23469811477452038, 'fraction_numerical': 0.02549622124408272, 'mean_word_length': 4.87701317715959, 'pattern_counts': {'":': 0, '<': 193, '<?xml version=': 0, '>': 193, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4790369', 'n_tokens_mistral': 4748, 'n_tokens_neox': 4338, 'n_words': 1028}