Search results

Show exact date after scrolling through button click

23 Mar 2023 / 4 minutes to read

By using button click you can show exact time or month after scrolling. Here we have changed zooFactor and zoomPosition based on time or month requirement. After scrolling you want show full month or full day data then you will customize the zoomFactor and zoomPosition of the chart and show exact time or month.

Copied to clipboard
<!DOCTYPE html><html lang="en"><head>
    <title>EJ2 Animation</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="Typescript UI Controls">
    <meta name="author" content="Syncfusion">
    <link href="index.css" rel="stylesheet">
<script src="" type="text/javascript"></script>

    <div id="container">
            <button id="lastdata">Last Month</button>
            <button id="chartmode">Switch To Hour</button>
        <div id="element" style="height: 300px"></div>

var ele = document.getElementById('container');
if(ele) { = "visible";
<script src="index.js" type="text/javascript"></script>