mirror of
https://github.com/FlipsideCrypto/flipside-js.git
synced 2026-02-06 10:48:11 +00:00
Update links.
This commit is contained in:
parent
0411a6742d
commit
68796ce9bb
@ -5,7 +5,7 @@
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<title>flipside.js</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<script src="flipside-v1.9.0.js"></script>
|
||||
<script src="flipside-v1.10.0.js"></script>
|
||||
<style>
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "flipside-js",
|
||||
"version": "1.9.0",
|
||||
"version": "1.10.0",
|
||||
"description": "FlipsideJS provides a library embeddable widgets that display data from the Flipside Platform API, including FCAS.",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
||||
@ -72,35 +72,6 @@ export const DEFAULT_HIGHCHARTS: Highcharts.Options = {
|
||||
} as any
|
||||
},
|
||||
inputEnabled: false
|
||||
},
|
||||
|
||||
exporting: {
|
||||
enabled: true,
|
||||
buttons: {
|
||||
contextButton: {
|
||||
verticalAlign: "top",
|
||||
x: 0,
|
||||
y: 0,
|
||||
|
||||
color: "#ffffff",
|
||||
symbolFill: "#ffffff",
|
||||
theme: {
|
||||
fill: "transparent",
|
||||
cursor: "pointer",
|
||||
states: { hover: { fill: "transparent", opacity: 0.7 } }
|
||||
},
|
||||
menuItems: [
|
||||
"downloadCSV",
|
||||
"separator",
|
||||
"printChart",
|
||||
"separator",
|
||||
"downloadPNG",
|
||||
"downloadJPEG",
|
||||
"downloadPDF",
|
||||
"downloadSVG"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@ -28,11 +28,13 @@ export type Props = {
|
||||
endDate?: string;
|
||||
series: ChartSeries[];
|
||||
api: API;
|
||||
exportingEnabled?: boolean;
|
||||
};
|
||||
|
||||
class Chart extends Component<Props> {
|
||||
static defaultProps: Partial<Props> = {
|
||||
axisTitles: []
|
||||
axisTitles: [],
|
||||
exportingEnabled: false
|
||||
};
|
||||
|
||||
container: HTMLElement;
|
||||
@ -127,15 +129,51 @@ class Chart extends Component<Props> {
|
||||
},
|
||||
rest
|
||||
);
|
||||
if (this.props.exportingEnabled) {
|
||||
options.exporting = {
|
||||
enabled: true,
|
||||
buttons: {
|
||||
contextButton: {
|
||||
verticalAlign: "bottom",
|
||||
horizontalAlign: "right",
|
||||
x: 0,
|
||||
y: 0,
|
||||
|
||||
color: "#ffffff",
|
||||
symbolFill: "#ffffff",
|
||||
theme: {
|
||||
fill: "transparent",
|
||||
cursor: "pointer",
|
||||
states: { hover: { fill: "transparent", opacity: 0.7 } }
|
||||
},
|
||||
menuItems: [
|
||||
"downloadCSV",
|
||||
"separator",
|
||||
"printChart",
|
||||
"separator",
|
||||
"downloadPNG",
|
||||
"downloadJPEG",
|
||||
"downloadPDF",
|
||||
"downloadSVG"
|
||||
]
|
||||
}
|
||||
}
|
||||
};
|
||||
} else {
|
||||
options.exporting = { enabled: false };
|
||||
}
|
||||
Highcharts.chart(options);
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div className={css.wrapper}>
|
||||
<CustomLinks
|
||||
widget="chart"
|
||||
api={this.props.api}
|
||||
style={{ display: "block", textAlign: "right" }}
|
||||
/>
|
||||
<div ref={el => (this.container = el)} />
|
||||
<CustomLinks widget="chart" api={this.props.api} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user