Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <script src="https://code.jquery.com/jquery-3.5.1.js" integrity="sha256-QWo7LDvxbWT2tbbQ97B53yJnYU3WhH/C8ycbRAkjPDc=" crossorigin="anonymous"></script>
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">

<nav class="blue darken-3">
	<div class="nav-wrapper">
		<a href="#!" class="sidenav-trigger brand-logo left" data-target="slide-out"><i class="material-icons" style="margin-left: 5px;">menu</i>Logo</a>
		<ul class="right hide-on-med-and-down">
			<li><a href="sass.html"><i class="material-icons">search</i></a></li>
			<li><a href="badges.html"><i class="material-icons">view_module</i></a></li>
			<li><a href="collapsible.html"><i class="material-icons">refresh</i></a></li>
			<li><a href="mobile.html"><i class="material-icons">more_vert</i></a></li>
		</ul>
	</div>
</nav>
<ul id="slide-out" class="sidenav sidenav-fixed sidenav-close">
	<li>
		<div class="user-view">
			<div class="background">
				<img src="https://c4.wallpaperflare.com/wallpaper/876/437/102/blue-material-material-design-minimal-art-wallpaper-preview.jpg">
			</div>
			<a href="#user"><img class="circle" src="https://icon-library.com/images/google-user-icon/google-user-icon-21.jpg"></a>
			<a href="#name"><span class="white-text name">John Doe</span></a>
			<a href="#email"><span class="white-text email">jdandturk@gmail.com</span></a>
		</div>
	</li>
	<li><a class="waves-effect" href="#!"><i class="material-icons">home</i>Home</a></li>
	<li><a class="waves-effect" href="#!"><i class="material-icons">tag</i>Link</a></li>
	<li>
		<div class="divider"></div>
	</li>
	<li><a class="subheader">Subheader</a></li>
	<li><a class="waves-effect" href="#!"><i class="material-icons">link</i>Link</a></li>
	<li><a class="waves-effect" href="#!"><i class="material-icons">link</i>Link</a></li>
	<li><a class="waves-effect" href="#!"><i class="material-icons">link</i>Link</a></li>
	<li><a class="waves-effect" href="#!"><i class="material-icons">link</i>Link</a></li>
	<li><a class="waves-effect" href="#!"><i class="material-icons">link</i>Link</a></li>
	<li><a class="waves-effect" href="#!"><i class="material-icons">link</i>Link</a></li>
	<li><a class="waves-effect" href="#!"><i class="material-icons">link</i>Link</a></li>
</ul>
<div class="row chart">
	<div class="col s6">
		<canvas id="myChart" width="100%" height="400"></canvas>
	</div>
	<div class="col s6 ">
		<canvas id="chart2" width="100%" height="400"></canvas>
	</div>
</div>
<div class="row">
	<div class="col s12 m6">
		<div class="row">
			<div class="col s12 m6">
				<div class="card pink darken-1">
					<div class="card-content white-text">
						<span class="card-title">34, 291, 234</span>
						<p>People </p>
					</div>
				</div>
			</div>
			<div class="col s12 m6">
				<div class="card cyan darken-1">
					<div class="card-content white-text">
						<span class="card-title">817, 173, 918</span>
						<p>Unique visitors</p>
					</div>
				</div>
			</div>
		</div>
	</div>
	<div class="col s12 s12 m6">
		<div class="card red darken-1">
			<div class="card-content white-text">
				<span class="card-title">923, 281, 917</span>
				<p>Daily visitors</p>
			</div>
		</div>

	</div>
</div>
<div class="row">
	<div class="col s12 m4">
		<div class="card teal darken-1">
			<div class="card-content white-text">
				<span class="card-title">923, 281, 917</span>
				<p>Daily visitors</p>
			</div>
		</div>

	</div>
	<div class="col s12 s12 m4">
		<div class="card yellow darken-1">
			<div class="card-content white-text">
				<span class="card-title">555, 281, 133</span>
				<p>Daily visitors</p>
			</div>
		</div>

	</div>
	<div class="col s12 m4">
		<div class="card blue darken-1">
			<div class="card-content white-text">
				<span class="card-title">923, 281, 917</span>
				<p>Daily visitors</p>
			</div>
		</div>

	</div>
</div>
<div class="row">
	<div class="col s12 m6">
		<div class="card white">
			<div class="card-content white-text">
				<span class="card-title text-black">My Todo list</span>
				<p>
					<label>
						<input type="checkbox" />
						<span>CODE</span>
					</label>
				</p>
				<p>
					<label>
						<input type="checkbox" />
						<span>CODE</span>
					</label>
				</p>
				<p>
					<label>
						<input type="checkbox" />
						<span>CODE</span>
					</label>
				</p>
				<p>
					<label>
						<input type="checkbox" />
						<span>CODE</span>
					</label>
				</p>
				<p>
					<label>
						<input type="checkbox" />
						<span>CODE</span>
					</label>
				</p>
				<p>
					<label>
						<input type="checkbox" />
						<span>CODE</span>
					</label>
				</p>
				<p>
					<label>
						<input type="checkbox" />
						<span>CODE</span>
					</label>
				</p>
			</div>
		</div>
	</div>
</div>
<footer class="page-footer blue darken-3">
	<div class="container">
		<div class="row">
			<div class="col l6 s12">
				<h5 class="white-text">Footer Content</h5>
				<p class="grey-text text-lighten-4">You can use rows and columns here to organize your footer content.</p>
			</div>
			<div class="col l4 offset-l2 s12">
				<h5 class="white-text">Links</h5>
				<ul>
					<li><a class="grey-text text-lighten-3" href="#!">Link 1</a></li>
					<li><a class="grey-text text-lighten-3" href="#!">Link 2</a></li>
					<li><a class="grey-text text-lighten-3" href="#!">Link 3</a></li>
					<li><a class="grey-text text-lighten-3" href="#!">Link 4</a></li>
				</ul>
			</div>
		</div>
	</div>
	<div class="footer-copyright">
		<div class="container">
			© 2021 Copyright Text
			<a class="grey-text text-lighten-4 right" href="#!">More Links</a>
		</div>
	</div>
</footer>
              
            
!

CSS

              
                header,
body {
	padding-left: 300px;
}

@media only screen and (max-width: 992px) {
	header,
	body {
		padding-left: 0;
	}
	.chart .col.s6 {
		width: 100% !important;
	}
}

.text-black {
	color: black
}
              
            
!

JS

              
                var ctx = document.getElementById('myChart').getContext('2d');
var myChart = new Chart(ctx, {
            type: 'line',
            data: {
                labels: ['','01/19/2021','01/19/2021','12/19/2020','12/03/2020','12/01/2020','12/01/2020','12/01/2020','12/01/2020','12/01/2020','12/01/2020','12/01/2020','12/01/2020','12/01/2020','12/01/2020','12/01/2020','12/01/2020',],
datasets: [{
label: 'Amount you spent',
data: [0,14,12,12,12,23,21,12,5,4,2,9,6,5,4,4,5,],
 backgroundColor : ['rgba(255, 99, 132, 0.1)'],
                borderColor : ['rgba(255, 99, 132, 1)'],
                borderWidth: 1
            }]
    },
    options: {
        maintainAspectRatio: false,
        scales: {
            yAxes: [{
                ticks: {
                    beginAtZero: true,
                },
                scaleLabel: {
                    display: true,
                    labelString: 'You spent '
                }
            }],
            annotation: {
                annotations: [{
                    type: 'line',
                    mode: 'horizontal',
                    scaleID: 'y-axis-0',
                    value: 5,
                    borderColor: 'rgb(75, 192, 192)',
                    borderWidth: 4,
                    label: {
                        enabled: false,
                        content: 'Test label'
                    }
                }]
            },
            xAxes: [{
                gridLines: {
                    color: "rgba(0, 0, 0, 0)",
                },
                scaleLabel: {
                    display: true,
                    labelString: 'Day'
                }
            }]
        },
        tooltips: {
            titleFontSize: 16,
            caretPadding: 10,
            bodyFontSize: 14,
            mode: 'x',
            displayColors: false,
            callbacks: {
                label: function(tooltipItems, data) {
                    return data.datasets[tooltipItems.datasetIndex].label + ': ' + tooltipItems.yLabel + ' dollars';
                },
            },
        },
        elements: {
            animationEasing: 'easeIn',
            line: {
                tension: 0
            },
            point: {
                radius: 0
            }
        },
    }
});
ctx.height = 500;   


var ctx = document.getElementById('chart2').getContext('2d');
var myChart = new Chart(ctx, {
            type: 'bar',
            data: {
                labels: ['','01/19/2021','01/19/2021','12/19/2020','12/03/2020','12/01/2020','12/01/2020','12/01/2020','12/01/2020','12/01/2020','12/01/2020','12/01/2020','12/01/2020','12/01/2020','12/01/2020','12/01/2020','12/01/2020',],
datasets: [{
label: 'Amount you spent',
data: [0,14,12,12,12,23,21,12,5,4,2,9,6,5,4,4,5,],
 backgroundColor : ['rgba(255, 99, 132, 0.1)'],
                borderColor : ['rgba(255, 99, 132, 1)'],
                borderWidth: 1
            }]
    },
    options: {
        maintainAspectRatio: false,
        scales: {
            yAxes: [{
                ticks: {
                    beginAtZero: true,
                },
                scaleLabel: {
                    display: true,
                    labelString: 'You spent '
                }
            }],
            annotation: {
                annotations: [{
                    type: 'line',
                    mode: 'horizontal',
                    scaleID: 'y-axis-0',
                    value: 5,
                    borderColor: 'rgb(75, 192, 192)',
                    borderWidth: 4,
                    label: {
                        enabled: false,
                        content: 'Test label'
                    }
                }]
            },
            xAxes: [{
                gridLines: {
                    color: "rgba(0, 0, 0, 0)",
                },
                scaleLabel: {
                    display: true,
                    labelString: 'Day'
                }
            }]
        },
        tooltips: {
            titleFontSize: 16,
            caretPadding: 10,
            bodyFontSize: 14,
            mode: 'x',
            displayColors: false,
            callbacks: {
                label: function(tooltipItems, data) {
                    return data.datasets[tooltipItems.datasetIndex].label + ': ' + tooltipItems.yLabel + ' dollars';
                },
            },
        },
        elements: {
            animationEasing: 'easeIn',
            line: {
                tension: 0
            },
            point: {
                radius: 0
            }
        },
    }
});
ctx.height = 500;   
$('.sidenav').sidenav();
              
            
!
999px

Console