Getting Started

Performance !!!

Chart Data

Bar and Column Charts

Line and Area Charts

Pie and Funnel Charts

Scatter and Bubble Charts

Radar and Polar Charts

Financial Charts

Gantt Charts

Combinational Charts

Dynamic Charts

Working with Chart Axes

Chart Features

Customizing Chart

Client-Side Events

Events:
Event 'data' parameter contains:

This sample shows the LegendItem touch events supported by jqChart:

- legendItemTouchStart
- legendItemTouchMove
- legendItemTouchEnd

For detailed implementation, please take a look at the HTML code tab.
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>
    LegendItem Touch Events Example - HTML5 jQuery Chart Plugin by jqChart
</title>
    <link rel="stylesheet" type="text/css" href="../../css/jquery.jqChart.css" />
    <link rel="stylesheet" type="text/css" href="../../css/jquery.jqRangeSlider.css" />
    <link rel="stylesheet" type="text/css" href="../../themes/smoothness/jquery-ui-1.10.4.css" />
    <script src="../../js/jquery-1.11.1.min.js" type="text/javascript"></script>
    <script src="../../js/jquery.mousewheel.js" type="text/javascript"></script>
    <script src="../../js/jquery.jqChart.min.js" type="text/javascript"></script>
    <script src="../../js/jquery.jqRangeSlider.min.js" type="text/javascript"></script>
    <!--[if IE]><script lang="javascript" type="text/javascript" src="../../js/excanvas.js"></script><![endif]-->
    
    <script lang="javascript" type="text/javascript">
        $(document).ready(function () {
            $('#jqChart').jqChart({
                title: "LegendItem Touch Events",
                legend: {
                    itemsCursor: 'pointer'
                },
                animation: { duration: 1 },
                series: [
                    {
                        type: 'column',
                        title: 'Series 1',
                        data: [['A', 46], ['B', 35], ['C', 68], ['D', 30],
                               ['E', 27], ['F', 85], ['D', 43], ['H', 29]]
                    },
                    {
                        type: 'column',
                        title: 'Series 2',
                        data: [['A', 69], ['B', 57], ['C', 86], ['D', 23],
                               ['E', 70], ['F', 60], ['D', 88], ['H', 22]]
                    }
                ]
            });

            var eventsDiv = document.getElementById('eventsDiv');

            $('#jqChart').bind('legendItemTouchStart', function (e, data) {
                $(eventsDiv).append('<div>legendItemTouchStart</div>');
                eventsDiv.scrollTop = eventsDiv.scrollHeight;

                displayDataOptions(data);
            });

            $('#jqChart').bind('legendItemTouchMove', function (e, data) {
                $(eventsDiv).append('<div>legendItemTouchMove</div>');
                eventsDiv.scrollTop = eventsDiv.scrollHeight;
            });

            $('#jqChart').bind('legendItemTouchEnd', function (e, data) {
                $(eventsDiv).append('<div>legendItemTouchEnd</div>');
                eventsDiv.scrollTop = eventsDiv.scrollHeight;
            });
        });

        function displayDataOptions(data) {
            var list = $('#listBlock');
            list.children().remove();

            list.append('<li>data.chart=' + data.chart + '</li>');
            list.append('<li>data.series=' + data.series + '</li>');
            list.append('<li>data.shape=' + data.shape + '</li>');
        }
    </script>

</head>
<body>
    <div>
        <table>
            <tr>
                <td>
                    <div id="jqChart" style="width: 400px; height: 300px;">
                    </div>
                </td>
                <td>
                    <b>Events:</b><br />
                    <div id="eventsDiv" class="box" style="width: 160px; height: 250px; overflow: auto;
                        border: 1px solid #E2EFDE; padding: 10px">
                    </div>
                </td>
            </tr>
        </table>
    </div>
    <div>
        <b>Event 'data' parameter contains:</b>
        <ul id='listBlock'>
        </ul>
    </div>
</body>
</html>