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 themes. You can see how to define different color schemes and change them with the colorScheme setting.
    </title>
    <meta name="description" content="This React Chart demo showcases Theming of Charts'" />
    <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/jqxlistbox.js"></script>
    <script type="text/javascript" src="../../../jqwidgets/jqxbuttons.js"></script>
    <script type="text/javascript" src="../../../jqwidgets/jqxscrollbar.js"></script>
    <script type="text/javascript" src="../../../jqwidgets/jqxdropdownlist.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 themes. You can see how to define different color schemes and change them with the colorScheme setting.
    </div>
    <div id="app"></div>
    <script src="../build/chart_themes.bundle.js"></script>
</body>
</html>

import React from 'react';import ReactDOM from 'react-dom';import JqxChart from '../../../jqwidgets-react/react_jqxchart.js';import JqxDropDownList from '../../../jqwidgets-react/react_jqxdropdownlist.js';class App extends React.Component {
    componentDidMount() {
        this.refs.myDropDownList.on('change', (event) => {
            let selectedIndex = this.refs.myDropDownList.selectedIndex();
            this.refs.myChart.colorScheme(this.colorSchemes()[selectedIndex].name);
        });
    }
    colorSchemes() {
        let schemes = [
            { name: 'scheme01', colors: ['#307DD7', '#AA4643', '#89A54E', '#71588F', '#4198AF'] },
            { name: 'scheme02', colors: ['#7FD13B', '#EA157A', '#FEB80A', '#00ADDC', '#738AC8'] },
            { name: 'scheme03', colors: ['#E8601A', '#FF9639', '#F5BD6A', '#599994', '#115D6E'] },
            { name: 'scheme04', colors: ['#D02841', '#FF7C41', '#FFC051', '#5B5F4D', '#364651'] },
            { name: 'scheme05', colors: ['#25A0DA', '#309B46', '#8EBC00', '#FF7515', '#FFAE00'] },
            { name: 'scheme06', colors: ['#0A3A4A', '#196674', '#33A6B2', '#9AC836', '#D0E64B'] },
            { name: 'scheme07', colors: ['#CC6B32', '#FFAB48', '#FFE7AD', '#A7C9AE', '#888A63'] },
            { name: 'scheme08', colors: ['#3F3943', '#01A2A6', '#29D9C2', '#BDF271', '#FFFFA6'] },
            { name: 'scheme09', colors: ['#1B2B32', '#37646F', '#A3ABAF', '#E1E7E8', '#B22E2F'] },
            { name: 'scheme10', colors: ['#5A4B53', '#9C3C58', '#DE2B5B', '#D86A41', '#D2A825'] },
            { name: 'scheme11', colors: ['#993144', '#FFA257', '#CCA56A', '#ADA072', '#949681'] },
            { name: 'scheme12', colors: ['#105B63', '#EEEAC5', '#FFD34E', '#DB9E36', '#BD4932'] },
            { name: 'scheme13', colors: ['#BBEBBC', '#F0EE94', '#F5C465', '#FA7642', '#FF1E54'] },
            { name: 'scheme14', colors: ['#60573E', '#F2EEAC', '#BFA575', '#A63841', '#BFB8A3'] },
            { name: 'scheme15', colors: ['#444546', '#FFBB6E', '#F28D00', '#D94F00', '#7F203B'] },
            { name: 'scheme16', colors: ['#583C39', '#674E49', '#948658', '#F0E99A', '#564E49'] },
            { name: 'scheme17', colors: ['#142D58', '#447F6E', '#E1B65B', '#C8782A', '#9E3E17'] },
            { name: 'scheme18', colors: ['#4D2B1F', '#635D61', '#7992A2', '#97BFD5', '#BFDCF5'] },
            { name: 'scheme19', colors: ['#844341', '#D5CC92', '#BBA146', '#897B26', '#55591C'] },
            { name: 'scheme20', colors: ['#56626B', '#6C9380', '#C0CA55', '#F07C6C', '#AD5472'] },
            { name: 'scheme21', colors: ['#96003A', '#FF7347', '#FFBC7B', '#FF4154', '#642223'] },
            { name: 'scheme22', colors: ['#5D7359', '#E0D697', '#D6AA5C', '#8C5430', '#661C0E'] },
            { name: 'scheme23', colors: ['#16193B', '#35478C', '#4E7AC7', '#7FB2F0', '#ADD5F7'] },
            { name: 'scheme24', colors: ['#7B1A25', '#BF5322', '#9DA860', '#CEA457', '#B67818'] },
            { name: 'scheme25', colors: ['#0081DA', '#3AAFFF', '#99C900', '#FFEB3D', '#309B46'] },
            { name: 'scheme26', colors: ['#0069A5', '#0098EE', '#7BD2F6', '#FFB800', '#FF6800'] },
            { name: 'scheme27', colors: ['#FF6800', '#A0A700', '#FF8D00', '#678900', '#0069A5'] }
        ];

        return schemes;
    }
    render() {
        let sampleData = [
            { Day: 'Monday', Keith: 30, Erica: 15, George: 25, Monica: 20, Maria: 15 },
            { Day: 'Tuesday', Keith: 25, Erica: 25, George: 30, Monica: 25, Maria: 20 },
            { Day: 'Wednesday', Keith: 30, Erica: 20, George: 25, Monica: 10, Maria: 20 },
            { Day: 'Thursday', Keith: 35, Erica: 25, George: 45, Monica: 30, Maria: 30 },
            { Day: 'Friday', Keith: 20, Erica: 20, George: 25, Monica: 45, Maria: 30 },
            { Day: 'Saturday', Keith: 30, Erica: 20, George: 30, Monica: 60, Maria: 40 },
            { Day: 'Sunday', Keith: 60, Erica: 45, George: 90, Monica: 70, Maria: 50 }
        ];

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

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

        let xAxis =
            {
                dataField: 'Day',
                showGridLines: true
            };

        let seriesGroups =
            [
                {
                    type: 'column',
                    columnsGapPercent: 50,
                    seriesGapPercent: 0,
                    valueAxis:
                    {
                        unitInterval: 10,
                        minValue: 0,
                        maxValue: 100,
                        displayValueAxis: true,
                        description: 'Time in minutes',
                        axisSize: 'auto',
                        tickMarksColor: '#888888'
                    },
                    series: [
                        { dataField: 'Keith', displayText: 'Keith' },
                        { dataField: 'Erica', displayText: 'Erica' },
                        { dataField: 'George', displayText: 'George' },
                        { dataField: 'Monica', displayText: 'Monica' },
                        { dataField: 'Maria', displayText: 'Maria' }
                    ]
                }
            ];

        
        let itemTemplate = (index) => {
            if (index == -1) return '';
            let colors = this.colorSchemes()[index].colors;
            let html = '';
            for (let i = 0; i < colors.length; i++) {
                html += '<div style="float: left; border-radius: 100%; width: 25px; height: 25px; border: none; background:' + colors[i] + '; margin-left: 4px;"></div>';
            }
            return html;
        };
        let selectionTemplate = (element, index) => {
            if (index < 0)
                return;
            let colors = this.colorSchemes()[index].colors;
            let html = '';
            for (let i = 0; i < colors.length; i++) {
                html += '<div style="margin-top: 2px; float: left; border-radius: 100%; width: 25px; height: 25px; border: none; background:' + colors[i] + '; margin-left: 4px;"></div>';
            }
            return html;
        };
        return (
            <div>
                <JqxChart ref='myChart' style={{ width: 850, height: 500 }}
                    title={'Fitness & exercise weekly scorecard'} description={'Time spent in vigorous exercise'}
                    showLegend={true} enableAnimations={false} padding={padding}
                    titlePadding={titlePadding} source={sampleData} xAxis={xAxis}
                    colorScheme={'scheme01'} seriesGroups={seriesGroups}
                />
                <br />
                Themes:
                <JqxDropDownList ref='myDropDownList'
                    width={180} height={28} selectedIndex={0} itemHeight={35} selectionRenderer={selectionTemplate}
                    source={this.colorSchemes()} displayMember={'name'} renderer={itemTemplate}
                /> 
            </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.