jQWidgets
  • Documentation
  • License and Pricing
  • Services
  • Community
    • Forums
    • Blogs
    • Follow Us
    • Client Login
  • About
    • About Us
    • Contact Us
    • FAQ
  • Demo
  • Download

React UI Components

  • Javascript/jQuery
  • Angular 2
  • React
  • ASP .NET MVC
  • Showcase Demos
  • Responsive Design
  • Theme Builder
Show Demo List

React UI Components

  • jqxGrid
  • jqxTabs
  • jqxTextArea
  • jqxWindow
  • jqxKnob
  • jqxResponsivePanel
  • jqxChart
  • jqxMenu
  • jqxInput
  • jqxDocking
  • jqxGauge
  • jqxNavBar
  • jqxScheduler
  • jqxTree
  • jqxPasswordInput
  • jqxNotification
  • jqxBarGauge
  • jqxSortable
  • jqxTreeGrid
  • jqxNavigationBar
  • jqxMaskedInput
  • jqxPopOver
  • jqxExpander
  • jqxLoader
  • jqxDataTable
  • jqxListMenu
  • jqxComplexInput
  • jqxTooltip
  • jqxRating
  • jqxDraw
  • jqxTreeMap
  • jqxToolBar
  • jqxFormattedInput
  • jqxColorPicker
  • jqxRangeSelector
  • jqxDragDrop
  • jqxEditor
  • jqxComboBox
  • jqxNumberInput
  • jqxScrollView
  • jqxSlider
  • jqxPanel
  • jqxRibbon
  • jqxDropDownList
  • jqxDateTimeInput
  • jqxProgressBar
  • jqxScrollBar
  • jqxValidator
  • jqxLayout
  • jqxListBox
  • jqxCalendar
  • jqxFileUpload
  • jqxSplitter
  • jqxValidator
  • jqxDockingLayout
  • jqxButtons
  • jqxKanban
  • jqxBulletChart

jqxChart

  • Line & Area Series
    • Line Series
    • Stacked Line Series
    • 100% Stacked Line Series
    • Line Series Markers
    • Line Serie with Missing Points
    • Line Serie with Conditional Colors
    • Line Serie with Multiple Data Sources
    • Step Line Series
    • Spline Series
    • Area Series
    • Stacked Area Series
    • 100% Stacked Area Series
    • Area Spline Series
  • Column & Bar Series
    • Column Series
    • Column Series with Local Data
    • Stacked Column Series
    • Stacked and Grouped Column Series
    • 100% Stacked Columns
    • Column Serie with Conditional Colors
    • Column Range
    • Bar Series
    • Column Series Spacing
    • Negative Values
    • Negative Bar Series
    • Columns Series with Missing Values
    • Column Series with Labels
  • Pie & Donut Series
    • Pie Series
    • Pie Series Legend
    • Partial Pie Series
    • Donut Series
    • Donut Labels
  • Logarithmic Axis
    • Columns with Logarithmic Axis
    • Columns with base 10 Logarithmic Axis
    • Logarithmic Axis Base Line
    • Percentage Stacked Columns
    • Stacked Columns
    • Logarithmic X Axis
    • Spline Area
    • Columns Range
    • Waterfall Series
    • Stacked Waterfall Series
  • Zooming
    • Date/Time X-Axis Range Selection
    • Non-Date X-Axis Range Selection
  • Waterfall Series
    • Waterfall Series
    • Waterfall with Multiple Series
  • OHLC & Candlestick
    • Candlestick Chart
    • OHLC Chart
  • Polar & Spider Series
    • Polar Chart
    • Partial Polar Chart
    • Polar Series Bands
    • Spider Chart
  • Funnel & Pyramid Series
    • Funnel Chart
    • Stacked Funnel Chart
    • Pyramid Chart
    • Stacked Pyramid Chart
  • Bubble Chart
  • Scatter Chart
  • Multiple Series Types
  • Live Updates
  • Live Updates Every Second
  • Live Updates Performance
  • Color Bands
  • Color Bands X Axis
  • Chart Annotations
  • Dashboard
  • Sparklines
  • Styling & Layout
    • Axis Position
    • Axis Orientation
    • Axis Settings
    • Axis Offset to Value
    • Axis Custom Offsets and Color Bands
    • Axis Custom Offsets
    • Intervals and Steps
    • Right to Left Layout
    • Text Rotation
    • Text Wrapping
    • Alternating Background Color
    • Tooltip Formatting
    • Chart Crosshairs
    • Grid Lines Dash Style
    • Greyscale Series
    • Custom Styling
    • Dark Background
    • Themes
  • Custom Drawing
  • Fluid Size
  • Chart Events
  • Chart RangeSelector Events
  • Export to Image
  • Chart Printing
  • Chart with Grid
  • Chart with Tabs
Theme:
  • Demo
  • App.htm
  • App.js
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title id='Description'>
        This is an example of React Chart unit intervals, grid lines, tick marks and label steps. You have to change the unit interval and step properties to see their effect.
    </title>
    <meta name="description" content="This React Chart demo showcases how to use Logarithmic Axis feature'" />
    <link rel="stylesheet" href="../../../jqwidgets/styles/jqx.base.css" type="text/css" />
    <script type="text/javascript" src="../../../jqwidgets/jqxcore.js"></script>
    <script type="text/javascript" src="../../../jqwidgets/jqxdraw.js"></script>
    <script type="text/javascript" src="../../../jqwidgets/jqxchart.core.js"></script>
    <script type="text/javascript" src="../../../jqwidgets/jqxdata.js"></script>
    <script type="text/javascript" src="../../../jqwidgets/jqxnumberinput.js"></script>
    <script type="text/javascript" src="../../../jqwidgets/jqxbuttons.js"></script>
    <script type="text/javascript" src="../../../jqwidgets/jqxcheckbox.js"></script>
    <script type="text/javascript" src="../../../scripts/demos.js"></script>
</head>
<body>
    <div class="example-description" style="margin-bottom:3em">
        This is an example of React Chart unit intervals, grid lines, tick marks and label steps. You have to change the unit interval and step properties to see their effect.
    </div>
    <div id="app"></div>
    <script src="../build/chart_intervalandsteps.bundle.js"></script>
</body>
</html>

import React from 'react';import ReactDOM from 'react-dom';import JqxChart from '../../../jqwidgets-react/react_jqxchart.js';import JqxCheckBox from '../../../jqwidgets-react/react_jqxcheckbox.js';import JqxNumberInput from '../../../jqwidgets-react/react_jqxnumberinput.js';class App extends React.Component {
    componentDidMount() {
        this.refs.inputxAxisUnitInterval.on('valueChanged', (event) => {
            let value = event.args.value;
            this.refs.myChart.xAxis().unitInterval = parseInt(value);
            this.refs.myChart.refresh();
        });

        this.refs.inputxAxisLabelsStep.on('valueChanged', (event) => {
            let value = event.args.value;
            this.refs.myChart.xAxis().labels.step = parseInt(value);
            this.refs.myChart.refresh();
        });

        this.refs.inputxAxisTickMarksStep.on('valueChanged', (event) => {
            let value = event.args.value;
            this.refs.myChart.xAxis().tickMarks.step = parseInt(value);
            this.refs.myChart.refresh();
        });

        this.refs.inputxAxisGridLinesStep.on('valueChanged', (event) => {
            let value = event.args.value;
            this.refs.myChart.xAxis().gridLines.step = parseInt(value);
            this.refs.myChart.refresh();
        });

        this.refs.inputvalueAxisUnitInterval.on('valueChanged', (event) => {
            let value = event.args.value;
            this.refs.myChart.valueAxis().unitInterval = parseInt(value);
            this.refs.myChart.refresh();
        });

        this.refs.inputvalueAxisLabelsStep.on('valueChanged', (event) => {
            let value = event.args.value;
            this.refs.myChart.valueAxis().labels.step = parseInt(value);
            this.refs.myChart.refresh();
        });

        this.refs.inputvalueAxisTickMarksStep.on('valueChanged', (event) => {
            let value = event.args.value;
            this.refs.myChart.valueAxis().tickMarks.step = parseInt(value);
            this.refs.myChart.refresh();
        });

        this.refs.inputvalueAxisGridLinesStep.on('valueChanged', (event) => {
            let value = event.args.value;
            this.refs.myChart.valueAxis().gridLines.step = parseInt(value);
            this.refs.myChart.refresh();
        });

        this.refs.btnValuesBetweenTicks.on('change', (event) => {
            this.refs.myChart.xAxis().valuesOnTicks = !event.args.checked;
            this.refs.myChart.refresh();
        });

        this.refs.btnvalueAxisValuesBetweenTicks.on('change', (event) => {
            this.refs.myChart.valueAxis().valuesOnTicks = !event.args.checked;
            this.refs.myChart.refresh();
        });
    }
    render() {
        let data = [12, 3, 16, 12, 24, 15, 17, 9, 31, 25, 15, 5, 8, 19, 23, 15, 31, 26, 11, 19, 5, 1, 8, 18, 12, 3, 16, 12, 24, 15, 17, 9, 31, 25, 15, 5, 8, 19, 23, 15, 31, 26, 11, 19, 5, 1, 8, 18, 5, 12, 11];

        let padding = { left: 10, top: 5, right: 10, bottom: 5 };

        let titlePadding = { left: 90, top: 0, right: 0, bottom: 10 };

        let xAxis =
            {
                unitInterval: 1,
                gridLines: { step: 1 },
                tickMarks: { step: 1 },
                labels: { step: 2 }
            };

        let valueAxis =
            {
                title: { text: 'Value<br>' },
                unitInterval: 5,
                gridLines: { step: 1 },
                tickMarks: { step: 1 },
                labels: { step: 1 },
                minValue: 0
            };

        let seriesGroups =
            [
                {
                    type: 'line',
                    series:
                    [
                        { displayText: 'value', opacity: 0.7 }
                    ]
                }
            ];
        return (
            <div>
                <JqxChart ref='myChart' style={{ width: 850, height: 500 }}
                    title={'jqxChart unit interval and steps example'} description={''}
                    showLegend={true} enableAnimations={false} padding={padding} enableCrosshairs={false}
                    titlePadding={titlePadding} source={data} xAxis={xAxis}
                    valueAxis={valueAxis} colorScheme={'scheme05'} seriesGroups={seriesGroups}
                />
                <table>
                    <tbody>
                        <tr>
                            <td>
                                <table>
                                    <tbody>
                                        <tr style={{ height: 50 }}><td colSpan='2'><b>xAxis() settings:</b></td></tr>
                                        <tr>
                                            <td>Labels step</td>
                                            <td>
                                                <JqxNumberInput ref='inputxAxisLabelsStep'
                                                    width={50} height={25} min={1} max={10}
                                                    inputMode={'simple'} decimalDigits={0}
                                                    digits={2} spinButtons={true} value={2}
                                                />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>Grid lines step</td>
                                            <td>
                                                <JqxNumberInput ref='inputxAxisGridLinesStep'
                                                    width={50} height={25} min={1} max={10}
                                                    inputMode={'simple'} decimalDigits={0}
                                                    digits={2} spinButtons={true} value={1}
                                                />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>Tick marks step</td>
                                            <td>
                                                <JqxNumberInput ref='inputxAxisTickMarksStep'
                                                    width={50} height={25} min={1} max={10}
                                                    inputMode={'simple'} decimalDigits={0}
                                                    digits={2} spinButtons={true} value={1}
                                                />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>Unit interval</td>
                                            <td>
                                                <JqxNumberInput ref='inputxAxisUnitInterval'
                                                    width={50} height={25} min={1} max={10}
                                                    inputMode={'simple'} decimalDigits={0}
                                                    digits={2} spinButtons={true} value={1}
                                                />    
                                            </td>
                                        </tr>
                                        <tr style={{ height: 40 }}>
                                            <td colSpan='2'>
                                                <JqxCheckBox ref='btnValuesBetweenTicks' value='Values between ticks'
                                                    width={200} height={25}
                                                    hasThreeStates={false} checked={false}
                                                />
                                            </td>
                                        </tr>
                                    </tbody>
                                </table>
                            </td>
                            <td>
                                <table style={{ paddingLeft: 100 }}>
                                    <tbody>
                                        <tr style={{ height: 50 }}><td colSpan='2'><b>valueAxis() settings:</b></td></tr>
                                        <tr>
                                            <td>Labels step</td>
                                            <td>
                                                <JqxNumberInput ref='inputvalueAxisLabelsStep'
                                                    width={50} height={25} min={1} max={10}
                                                    inputMode={'simple'} decimalDigits={0}
                                                    digits={2} spinButtons={true} value={1}
                                                />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>Grid lines step</td>
                                            <td>
                                                <JqxNumberInput ref='inputvalueAxisGridLinesStep'
                                                    width={50} height={25} min={1} max={10}
                                                    inputMode={'simple'} decimalDigits={0}
                                                    digits={2} spinButtons={true} value={1}
                                                />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>Tick marks step</td>
                                            <td>
                                                <JqxNumberInput ref='inputvalueAxisTickMarksStep'
                                                    width={50} height={25} min={1} max={10}
                                                    inputMode={'simple'} decimalDigits={0}
                                                    digits={2} spinButtons={true} value={1}
                                                />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>Unit interval</td>
                                            <td>
                                                <JqxNumberInput ref='inputvalueAxisUnitInterval'
                                                    width={50} height={25} min={1} max={10}
                                                    inputMode={'simple'} decimalDigits={0}
                                                    digits={2} spinButtons={true} value={5}
                                                />
                                            </td>
                                        </tr>
                                        <tr style={{ height: 40 }}>
                                            <td colSpan='2'>
                                                <JqxCheckBox ref='btnvalueAxisValuesBetweenTicks' value='Values between ticks'
                                                    width={200} height={25}
                                                    hasThreeStates={false} checked={false}
                                                />
                                            </td>
                                        </tr>
                                    </tbody>
                                </table>

                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>
        )
    }
}

ReactDOM.render(<App />, document.getElementById('app'));

jQWidgets
  • Facebook
  • Youtube
  • Google +
  • Demo
  • Download
  • Documentation
  • License and Pricing
  • Services
  • Forums
  • About
  • Terms of Use
  • Privacy Policy
  • Contact Us

jQWidgets © 2011-2017. All Rights Reserved.