-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
608 changed files
with
30,970 additions
and
628 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<title id='Description'>Cells and Columns Styling of jqxGrid with Column's 'style' property.</title> | ||
<link rel="stylesheet" href="../../../jqwidgets/styles/jqx.base.css" type="text/css" /> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1 maximum-scale=1 minimum-scale=1" /> | ||
<script type="text/javascript" src="../../../scripts/jquery-1.12.4.min.js"></script> | ||
<script type="text/javascript" src="../../../jqwidgets/jqxcore.js"></script> | ||
<script type="text/javascript" src="../../../jqwidgets/jqxdata.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/jqxmenu.js"></script> | ||
<script type="text/javascript" src="../../../jqwidgets/jqxgrid.js"></script> | ||
<script type="text/javascript" src="../../../jqwidgets/jqxgrid.selection.js"></script> | ||
<script type="text/javascript" src="../../../jqwidgets/jqxlistbox.js"></script> | ||
<script type="text/javascript" src="../../../jqwidgets/jqxdropdownlist.js"></script> | ||
<script type="text/javascript" src="../../../jqwidgets/jqxgrid.pager.js"></script> | ||
<script type="text/javascript" src="../../../jqwidgets/jqxgrid.columnsresize.js"></script> | ||
<script type="text/javascript" src="../../../scripts/demos.js"></script> | ||
<script type="text/javascript"> | ||
$(document).ready(function () { | ||
// prepare the data | ||
var data = new Array(); | ||
|
||
var firstNames = | ||
[ | ||
"Andrew", "Nancy", "Shelley", "Regina", "Yoshi", "Antoni", "Mayumi", "Ian", "Peter", "Lars", "Petra", "Martin", "Sven", "Elio", "Beate", "Cheryl", "Michael", "Guylene" | ||
]; | ||
|
||
var lastNames = | ||
[ | ||
"Fuller", "Davolio", "Burke", "Murphy", "Nagase", "Saavedra", "Ohno", "Devling", "Wilson", "Peterson", "Winkler", "Bein", "Petersen", "Rossi", "Vileid", "Saylor", "Bjorn", "Nodier" | ||
]; | ||
|
||
var productNames = | ||
[ | ||
"Black Tea", "Green Tea", "Caffe Espresso", "Doubleshot Espresso", "Caffe Latte", "White Chocolate Mocha", "Cramel Latte", "Caffe Americano", "Cappuccino", "Espresso Truffle", "Espresso con Panna", "Peppermint Mocha Twist" | ||
]; | ||
|
||
var priceValues = | ||
[ | ||
"2.25", "1.5", "3.0", "3.3", "4.5", "3.6", "3.8", "2.5", "5.0", "1.75", "3.25", "4.0" | ||
]; | ||
|
||
for (var i = 0; i < 200; i++) { | ||
var row = {}; | ||
var productindex = Math.floor(Math.random() * productNames.length); | ||
var price = parseFloat(priceValues[productindex]); | ||
var quantity = 1 + Math.round(Math.random() * 10); | ||
|
||
row["firstname"] = firstNames[Math.floor(Math.random() * firstNames.length)]; | ||
row["lastname"] = lastNames[Math.floor(Math.random() * lastNames.length)]; | ||
row["productname"] = productNames[productindex]; | ||
row["price"] = price; | ||
row["quantity"] = quantity; | ||
row["total"] = price * quantity; | ||
|
||
data[i] = row; | ||
} | ||
|
||
var source = | ||
{ | ||
localdata: data, | ||
datatype: "array", | ||
datafields: | ||
[ | ||
{ name: 'firstname', type: 'string' }, | ||
{ name: 'lastname', type: 'string' }, | ||
{ name: 'productname', type: 'string' }, | ||
{ name: 'quantity', type: 'number' }, | ||
{ name: 'price', type: 'number' }, | ||
{ name: 'total', type: 'number' } | ||
] | ||
}; | ||
|
||
var dataAdapter = new $.jqx.dataAdapter(source); | ||
|
||
var style = { | ||
headerBackgroundColor: '#4267B2', | ||
headerColor: '#fff', | ||
headerBackgroundHoveredColor: '#FE6602', | ||
headerHoveredColor: '#fff', | ||
headerBackgroundSelectedColor: '#FC3752', | ||
headerSelectedColor: '#fff', | ||
backgroundColor: '#fff', | ||
color: '#333', | ||
backgroundHoveredColor: '#FE6602', | ||
hoveredColor: '#fff', | ||
backgroundSelectedColor: '#FC3752', | ||
selectedColor: '#fff' | ||
}; | ||
|
||
$("#grid").jqxGrid( | ||
{ | ||
width: getWidth('Grid'), | ||
source: dataAdapter, | ||
columnsresize: true, | ||
columns: [ | ||
{ text: 'Name', datafield: 'firstname', width: 120, style: style }, | ||
{ text: 'Last Name', datafield: 'lastname', width: 120, style: style }, | ||
{ text: 'Product', datafield: 'productname', width: 180, style: style }, | ||
{ text: 'Quantity', datafield: 'quantity', width: 80, cellsalign: 'right', style: style }, | ||
{ text: 'Unit Price', datafield: 'price', width: 90, cellsalign: 'right', cellsformat: 'c2', style: style }, | ||
{ text: 'Total', datafield: 'total', cellsalign: 'right', cellsformat: 'c2', style: style, resizable: false } | ||
] | ||
}); | ||
}); | ||
</script> | ||
</head> | ||
<body class='default'> | ||
<div id="grid"> | ||
</div> | ||
<div class="example-description"> | ||
This example demonstrates how to apply a custom Style to a Grid Column. The Column object has a 'style' property. With this property, you can style the Column Headers and Grid Cells very easily - by setting it to JSON object with the format shown in the example. | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"main": "react_jqxbargauge.umd.js", | ||
"module": "react_jqxbargauge.esm.js", | ||
"typings": "react_jqxbargauge.d.ts", | ||
"name": "jqwidgets-react-tsx/jqxbargauge", | ||
"sideEffects": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
import * as React from 'react'; | ||
declare class JqxBarGauge extends React.PureComponent<IBarGaugeProps, IState> { | ||
protected static defaultProps: IBarGaugeProps; | ||
protected static getDerivedStateFromProps(props: IBarGaugeProps, state: IState): null | IState; | ||
private _jqx; | ||
private _id; | ||
private _componentSelector; | ||
constructor(props: IBarGaugeProps); | ||
componentDidUpdate(): void; | ||
componentDidMount(): void; | ||
render(): React.ReactNode; | ||
createComponent(options: IBarGaugeProps): void; | ||
setOptions(options: IBarGaugeProps): void; | ||
getOptions(option: string): any; | ||
addEventListener(name: string, callbackFn: (e?: Event) => void): void; | ||
removeEventListener(name: string): void; | ||
refresh(): void; | ||
renderWidget(): void; | ||
val(value?: number[]): number[]; | ||
private _createComponent; | ||
private _manageProps; | ||
private _wireEvents; | ||
} | ||
export default JqxBarGauge; | ||
export declare const jqx: any; | ||
export declare const JQXLite: any; | ||
export declare const jqwidgets: any; | ||
interface IState { | ||
lastProps: object; | ||
} | ||
interface IBarGaugeLabelsFont { | ||
color?: string; | ||
size?: number | string; | ||
family?: string; | ||
} | ||
interface IBarGaugeLabels { | ||
connectorColor?: string; | ||
connectorWidth?: number; | ||
font?: IBarGaugeLabelsFont; | ||
formatFunction?: (value?: number, index?: number) => string; | ||
indent?: number; | ||
precision?: number; | ||
visible?: boolean; | ||
} | ||
interface IBarGaugeTextFont { | ||
color?: string; | ||
family?: string; | ||
opacity?: number; | ||
size?: number | string; | ||
weight?: number; | ||
} | ||
interface IBarGaugeTitleMargin { | ||
bottom?: number; | ||
left?: number; | ||
right?: number; | ||
top?: number; | ||
} | ||
interface IBarGaugeTitleSubtitle { | ||
text?: string; | ||
font?: IBarGaugeTextFont; | ||
} | ||
interface IBarGaugeTitle { | ||
text?: string; | ||
font?: IBarGaugeTextFont; | ||
horizontalAlignment?: 'left' | 'center' | 'right'; | ||
margin?: IBarGaugeTitleMargin; | ||
subtitle?: IBarGaugeTitleSubtitle; | ||
verticalAlignment?: 'top' | 'bottom'; | ||
} | ||
interface IBarGaugeFormatFunction { | ||
value?: number | string; | ||
index?: number; | ||
color?: string; | ||
} | ||
interface IBarGaugeTooltip { | ||
classname?: string; | ||
formatFunction?: (value?: IBarGaugeFormatFunction['value'], index?: IBarGaugeFormatFunction['index'], color?: IBarGaugeFormatFunction['color']) => string; | ||
visible?: boolean; | ||
precision?: number; | ||
} | ||
interface IBarGaugeCustomColorScheme { | ||
name?: string; | ||
colors?: string[]; | ||
} | ||
interface IBarGaugeOptions { | ||
animationDuration?: number; | ||
backgroundColor?: string; | ||
barSpacing?: number; | ||
baseValue?: number; | ||
colorScheme?: string; | ||
customColorScheme?: IBarGaugeCustomColorScheme; | ||
disabled?: boolean; | ||
endAngle?: number; | ||
formatFunction?: (value?: IBarGaugeFormatFunction['value'], index?: IBarGaugeFormatFunction['index'], color?: IBarGaugeFormatFunction['color']) => string; | ||
height?: string | number; | ||
labels?: IBarGaugeLabels; | ||
max?: number | string; | ||
min?: number; | ||
relativeInnerRadius?: number | string; | ||
rendered?: () => void; | ||
startAngle?: number; | ||
title?: IBarGaugeTitle; | ||
tooltip?: IBarGaugeTooltip; | ||
useGradient?: boolean; | ||
values?: number[]; | ||
width?: string | number; | ||
} | ||
export interface IBarGaugeProps extends IBarGaugeOptions { | ||
autoCreate?: boolean; | ||
className?: string; | ||
style?: React.CSSProperties; | ||
onDrawEnd?: (e?: Event) => void; | ||
onDrawStart?: (e?: Event) => void; | ||
onInitialized?: (e?: Event) => void; | ||
onTooltipClose?: (e?: Event) => void; | ||
onTooltipOpen?: (e?: Event) => void; | ||
onValueChanged?: (e?: Event) => void; | ||
} |
Oops, something went wrong.