score:2

Accepted answer

According to HighChart API and HighStock API:

renderTo: String|Object
The HTML element where the chart will be rendered. 
If it is a string, the element by that id is used. 
The HTML element can also be passed by direct reference. Defaults to null.

First, Highchart requires passing "id" of div element. So, I doubt how passing class name works with first example you have mentioned.

Can you please share from where did you get the former HighChart example ?

Second, Do you have a div containing id="graphcontainer" and included Highstock like

<script src="http://code.highcharts.com/stock/highstock.js"></script>

Related Query

More Query from same tag