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 is required to process package imports. If you need a different preprocessor remove all packages first.

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

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

              
                <html>
<head>
<link rel="stylesheet" type="text/css" href="style.css" />
<meta charset="UTF-8">
<title> task11_Создание графика(itmathrepetitor.ru)</title>
  </head>
<body lang='ru'>
	<article>
		<h1>Creating a chart</h1>
		<p>
		To create a chart, we need to instantiate the Chart class. To do this, we need to pass in the 2d
		context of where we want to draw the chart. Here's an example.
		</p>
		<div>
		<code>
		   <span class="darkblue">&lt;canvas</span> <span class='green'>id=</span><span class='red'>"myChart"</span> <span class='green'>width=</span><span class='red'>"400"</span> <span class='green'>height=</span><span class='red'>"400"</span><span class="darkblue">&lt;/canvas></span>
		</code>
		</div>
		</p>
	<div>	
		<em>// Get the context of the canvas element we want to select</em> </br>
		<code>
		   <span class="black">var</span> ctx= <span class='beruze'>document</span>.getElementById(<span class='red'>"myChart"</span>).getContext(<span class='red'>"2d"</span>); </br>
           <span class="black">var</span> <span class='red'>myNewChart</span> = <span class="black">new</span> Chart(ctx).PolarArea(data);
		 </code>
	</div>	 
	   <p>
	   We can also get the context of our canvas with jQuery. to do this, we need to
	   get the DOM node out of the jQuery collection, and call the getContext("2d") method on that.
	   </p>
	    
    <div class='last_block'>		
		<em>// Get context with jQuery - using jQuery's .get() method.</em> </br>
		<code>
		       <span class="black">var</span> ctx = $(<span class='red'>#myChart"</span>.get(<span class='beruze'>0</span>).getContext(<span class='red'>"2d"</span>) </br>
		</code>	   
		 <em>// This will get the first returned node in the jQuery collection</em> </br>
		<code>
           <span class="black">var</span> myNeChart = <span class="black">new</span> Chart(ctx);
		</code>  
	</div>	
		</p>
				After we're instantiated the Chart class on the canvas we want to draw on, Chart.js will handle the scaling for retina displays.
		</article>
	<address>
        <a href="http://www.itmathrepetitor.ru">http://www.itmathrepetitor.ru</a>
   </address>
</body>
</html>
              
            
!

CSS

              
                *{margin:0;
  padding:0;
 }
body{
      color:#585858;
	  width:1200px;
	  font-family:Verdana,georgia,palatino,serif;
	  margin:auto;
         text-align:left;
	}
article {
		 width:630px;
        }	
address{
        position:absolute;
		left:41em;
		top:31em; 
			    }
address a{
       color: black; 
	   font-size:12px;
	   text-decoration: none;
	     }
h1, a,.black {color:black;
              font-weight:bold;
             }
p {padding:1em 0 1em 0;}
code   {
         font-size:16px;
        }
em   {
      color:grey; 
      font-size:12px; 
     }
div {
     background-color:#D8D8D8;
	 border: 1px solid #D8D8D8;
	 border-radius: 6px;
    }
.last_block {
            overflow-x: scroll;
            }	
.red    {color:red;}
.green  {color:green;}
.beruze {color:#0B615E;}
.darkblue{color:#0B0B3B;}
              
            
!

JS

              
                
              
            
!
999px

Console