# A Line chart with a static Y-axis

A chart where the Y-axis is static and doesn't move when you scroll from left to right.

This goes in the documents header:

    <script src="RGraph.common.core.js"></script>
    <script src="RGraph.common.dynamic.js"></script>
    <script src="RGraph.common.tooltips.js"></script>
    <script src="RGraph.drawing.yaxis.js"></script>
    <script src="RGraph.line.js"></script>

Put this where you want the chart to show up:

    <div style="position: relative; width: 600px; height: 220px">
        <canvas id="axes" width="41" height="200" style="position: absolute; top: 5px; left: 0; z-index: 3"></canvas>
        <div style="width: 600px; overflow: auto; position: absolute; left: 41px">
            <canvas id="cvs" width="1000" height="200"></canvas>
        </div>
    </div>

This is the code that generates the chart - it should be placed AFTER the canvas tag(s):