@amcharts/amcharts5 5.1.9 → 5.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.internal/charts/radar/RadarChart.d.ts.map +1 -1
- package/.internal/charts/radar/RadarChart.js +0 -2
- package/.internal/charts/radar/RadarChart.js.map +1 -1
- package/.internal/charts/xy/XYChart.d.ts.map +1 -1
- package/.internal/charts/xy/XYChart.js +7 -0
- package/.internal/charts/xy/XYChart.js.map +1 -1
- package/.internal/charts/xy/XYChartDefaultTheme.d.ts.map +1 -1
- package/.internal/charts/xy/XYChartDefaultTheme.js +0 -2
- package/.internal/charts/xy/XYChartDefaultTheme.js.map +1 -1
- package/.internal/charts/xy/axes/AxisRendererX.d.ts.map +1 -1
- package/.internal/charts/xy/axes/AxisRendererX.js +1 -0
- package/.internal/charts/xy/axes/AxisRendererX.js.map +1 -1
- package/.internal/charts/xy/axes/ValueAxis.d.ts +1 -0
- package/.internal/charts/xy/axes/ValueAxis.d.ts.map +1 -1
- package/.internal/charts/xy/axes/ValueAxis.js +109 -71
- package/.internal/charts/xy/axes/ValueAxis.js.map +1 -1
- package/.internal/charts/xy/series/BaseColumnSeries.d.ts.map +1 -1
- package/.internal/charts/xy/series/BaseColumnSeries.js +9 -0
- package/.internal/charts/xy/series/BaseColumnSeries.js.map +1 -1
- package/.internal/charts/xy/series/XYSeries.d.ts.map +1 -1
- package/.internal/charts/xy/series/XYSeries.js +6 -0
- package/.internal/charts/xy/series/XYSeries.js.map +1 -1
- package/.internal/core/Root.d.ts.map +1 -1
- package/.internal/core/Root.js +1 -0
- package/.internal/core/Root.js.map +1 -1
- package/.internal/core/render/Legend.d.ts.map +1 -1
- package/.internal/core/render/Legend.js +7 -0
- package/.internal/core/render/Legend.js.map +1 -1
- package/.internal/core/render/Series.d.ts.map +1 -1
- package/.internal/core/render/Series.js +11 -7
- package/.internal/core/render/Series.js.map +1 -1
- package/.internal/core/render/backend/CanvasRenderer.d.ts +1 -0
- package/.internal/core/render/backend/CanvasRenderer.d.ts.map +1 -1
- package/.internal/core/render/backend/CanvasRenderer.js +17 -1
- package/.internal/core/render/backend/CanvasRenderer.js.map +1 -1
- package/.internal/core/render/backend/Renderer.d.ts +1 -0
- package/.internal/core/render/backend/Renderer.d.ts.map +1 -1
- package/.internal/core/render/backend/Renderer.js.map +1 -1
- package/.internal/core/util/PopulateString.js +12 -2
- package/.internal/core/util/PopulateString.js.map +1 -1
- package/.internal/plugins/json/Classes-script.d.ts +271 -0
- package/.internal/plugins/json/Classes-script.d.ts.map +1 -0
- package/.internal/plugins/json/Classes-script.js +139 -0
- package/.internal/plugins/json/Classes-script.js.map +1 -0
- package/.internal/plugins/json/Classes.d.ts +262 -262
- package/.internal/plugins/json/Classes.d.ts.map +1 -1
- package/.internal/plugins/json/Classes.js +131 -262
- package/.internal/plugins/json/Classes.js.map +1 -1
- package/.internal/plugins/json/Json.d.ts +3 -3
- package/.internal/plugins/json/Json.d.ts.map +1 -1
- package/.internal/plugins/json/Json.js +239 -34
- package/.internal/plugins/json/Json.js.map +1 -1
- package/CHANGELOG.md +19 -0
- package/examples/javascript/flow-chord/package.json +1 -1
- package/examples/javascript/flow-chord-directed/package.json +1 -1
- package/examples/javascript/flow-chord-non-ribbon/package.json +1 -1
- package/examples/javascript/flow-sankey/package.json +1 -1
- package/examples/javascript/gauge/package.json +1 -1
- package/examples/javascript/gauge-bands/package.json +1 -1
- package/examples/javascript/hierarchy-force-directed/package.json +1 -1
- package/examples/javascript/hierarchy-pack/package.json +1 -1
- package/examples/javascript/hierarchy-partition/package.json +1 -1
- package/examples/javascript/hierarchy-sunburst/package.json +1 -1
- package/examples/javascript/hierarchy-tree/package.json +1 -1
- package/examples/javascript/hierarchy-treemap/package.json +1 -1
- package/examples/javascript/json/README.md +6 -0
- package/examples/javascript/json/index.css +11 -0
- package/examples/javascript/json/index.html +12 -0
- package/examples/javascript/json/index.js +94 -0
- package/examples/javascript/json/package.json +16 -0
- package/examples/javascript/json/webpack.config.js +38 -0
- package/examples/javascript/map-animating-along-lines/package.json +1 -1
- package/examples/javascript/map-day-and-night/package.json +1 -1
- package/examples/javascript/map-globe-rotate-to-country/package.json +1 -1
- package/examples/javascript/map-globe-with-projected-circles/package.json +1 -1
- package/examples/javascript/map-with-bubbles/package.json +1 -1
- package/examples/javascript/map-zoom-to-country/package.json +1 -1
- package/examples/javascript/misc-40-charts/package.json +1 -1
- package/examples/javascript/misc-microchart-grid/package.json +1 -1
- package/examples/javascript/pie-chart/package.json +1 -1
- package/examples/javascript/pie-donut-chart/package.json +1 -1
- package/examples/javascript/pie-variable-radius/package.json +1 -1
- package/examples/javascript/radar-column-iwatch-style/package.json +1 -1
- package/examples/javascript/radar-heat-map/package.json +1 -1
- package/examples/javascript/radar-line/package.json +1 -1
- package/examples/javascript/radar-time-line/package.json +1 -1
- package/examples/javascript/sliced-funnel/package.json +1 -1
- package/examples/javascript/sliced-pictorial-stacked/package.json +1 -1
- package/examples/javascript/sliced-pyramid/package.json +1 -1
- package/examples/javascript/venn-diagram/package.json +1 -1
- package/examples/javascript/wordcloud-with-data/package.json +1 -1
- package/examples/javascript/wordcloud-with-text/package.json +1 -1
- package/examples/javascript/xy-100-percent-stacked-column/package.json +1 -1
- package/examples/javascript/xy-animated-bullet-at-the-end-of-the-series/package.json +1 -1
- package/examples/javascript/xy-bubble/package.json +1 -1
- package/examples/javascript/xy-candlestick/package.json +1 -1
- package/examples/javascript/xy-clustered-column/package.json +1 -1
- package/examples/javascript/xy-column/package.json +1 -1
- package/examples/javascript/xy-comparing-series-google-analytics-style/package.json +1 -1
- package/examples/javascript/xy-data-grouping/package.json +1 -1
- package/examples/javascript/xy-draggable-range/package.json +1 -1
- package/examples/javascript/xy-drawing-series-with-mouse-or-touch/package.json +1 -1
- package/examples/javascript/xy-dumbbell plot/package.json +1 -1
- package/examples/javascript/xy-evenly-spaced-date-axis/package.json +1 -1
- package/examples/javascript/xy-line/package.json +1 -1
- package/examples/javascript/xy-line-highlight-on-legend-hover/package.json +1 -1
- package/examples/javascript/xy-live-data/package.json +1 -1
- package/examples/javascript/xy-multiple-synced-value-axes/package.json +1 -1
- package/examples/javascript/xy-ohlc/package.json +1 -1
- package/examples/javascript/xy-real-time-data-sorting/package.json +1 -1
- package/examples/javascript/xy-smoothed-line/package.json +1 -1
- package/examples/javascript/xy-stacked-and-clustered-column/package.json +1 -1
- package/examples/javascript/xy-stacked-column/package.json +1 -1
- package/examples/javascript/xy-stacked-step/package.json +1 -1
- package/examples/javascript/xy-stock/package.json +1 -1
- package/examples/javascript/xy-stock-comparing/package.json +1 -1
- package/examples/typescript/flow-chord/package.json +1 -1
- package/examples/typescript/flow-chord-directed/package.json +1 -1
- package/examples/typescript/flow-chord-non-ribbon/package.json +1 -1
- package/examples/typescript/flow-sankey/package.json +1 -1
- package/examples/typescript/gauge/package.json +1 -1
- package/examples/typescript/gauge-bands/package.json +1 -1
- package/examples/typescript/hierarchy-force-directed/package.json +1 -1
- package/examples/typescript/hierarchy-pack/package.json +1 -1
- package/examples/typescript/hierarchy-partition/package.json +1 -1
- package/examples/typescript/hierarchy-sunburst/package.json +1 -1
- package/examples/typescript/hierarchy-tree/package.json +1 -1
- package/examples/typescript/hierarchy-treemap/package.json +1 -1
- package/examples/typescript/json/README.md +6 -0
- package/examples/typescript/json/index.css +11 -0
- package/examples/typescript/json/index.html +12 -0
- package/examples/typescript/json/index.ts +94 -0
- package/examples/typescript/json/package.json +18 -0
- package/examples/typescript/json/tsconfig.json +12 -0
- package/examples/typescript/json/webpack.config.js +45 -0
- package/examples/typescript/map-animating-along-lines/package.json +1 -1
- package/examples/typescript/map-day-and-night/package.json +1 -1
- package/examples/typescript/map-globe-rotate-to-country/package.json +1 -1
- package/examples/typescript/map-globe-with-projected-circles/package.json +1 -1
- package/examples/typescript/map-with-bubbles/package.json +1 -1
- package/examples/typescript/map-zoom-to-country/package.json +1 -1
- package/examples/typescript/misc-40-charts/package.json +1 -1
- package/examples/typescript/misc-microchart-grid/package.json +1 -1
- package/examples/typescript/pie-chart/package.json +1 -1
- package/examples/typescript/pie-donut-chart/package.json +1 -1
- package/examples/typescript/pie-variable-radius/package.json +1 -1
- package/examples/typescript/radar-column-iwatch-style/package.json +1 -1
- package/examples/typescript/radar-heat-map/package.json +1 -1
- package/examples/typescript/radar-line/package.json +1 -1
- package/examples/typescript/radar-time-line/package.json +1 -1
- package/examples/typescript/sliced-funnel/package.json +1 -1
- package/examples/typescript/sliced-pictorial-stacked/package.json +1 -1
- package/examples/typescript/sliced-pyramid/package.json +1 -1
- package/examples/typescript/venn-diagram/package.json +1 -1
- package/examples/typescript/wordcloud-with-data/package.json +1 -1
- package/examples/typescript/wordcloud-with-text/package.json +1 -1
- package/examples/typescript/xy-100-percent-stacked-column/package.json +1 -1
- package/examples/typescript/xy-animated-bullet-at-the-end-of-the-series/package.json +1 -1
- package/examples/typescript/xy-bubble/package.json +1 -1
- package/examples/typescript/xy-candlestick/package.json +1 -1
- package/examples/typescript/xy-clustered-column/package.json +1 -1
- package/examples/typescript/xy-column/package.json +1 -1
- package/examples/typescript/xy-comparing-series-google-analytics-style/package.json +1 -1
- package/examples/typescript/xy-data-grouping/package.json +1 -1
- package/examples/typescript/xy-draggable-range/package.json +1 -1
- package/examples/typescript/xy-drawing-series-with-mouse-or-touch/package.json +1 -1
- package/examples/typescript/xy-dumbbell plot/package.json +1 -1
- package/examples/typescript/xy-evenly-spaced-date-axis/package.json +1 -1
- package/examples/typescript/xy-line/package.json +1 -1
- package/examples/typescript/xy-line-highlight-on-legend-hover/package.json +1 -1
- package/examples/typescript/xy-live-data/package.json +1 -1
- package/examples/typescript/xy-multiple-synced-value-axes/package.json +1 -1
- package/examples/typescript/xy-ohlc/package.json +1 -1
- package/examples/typescript/xy-real-time-data-sorting/package.json +1 -1
- package/examples/typescript/xy-smoothed-line/package.json +1 -1
- package/examples/typescript/xy-stacked-and-clustered-column/package.json +1 -1
- package/examples/typescript/xy-stacked-column/package.json +1 -1
- package/examples/typescript/xy-stacked-step/package.json +1 -1
- package/examples/typescript/xy-stock/package.json +1 -1
- package/examples/typescript/xy-stock-comparing/package.json +1 -1
- package/index.d.ts +4 -0
- package/index.d.ts.map +1 -1
- package/index.js +4 -0
- package/index.js.map +1 -1
- package/locales/lt_LT.js +25 -25
- package/locales/lt_LT.js.map +1 -1
- package/package.json +9 -9
- package/xy.d.ts +1 -0
- package/xy.d.ts.map +1 -1
- package/xy.js +1 -0
- package/xy.js.map +1 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
body {
|
|
2
|
+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
|
|
3
|
+
padding: 0;
|
|
4
|
+
margin: 0;
|
|
5
|
+
background-color: #ffffff;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
#chartdiv {
|
|
9
|
+
width: 100%;
|
|
10
|
+
height: 80vh;
|
|
11
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<title>amCharts 5 Example - json</title>
|
|
6
|
+
<link rel="stylesheet" href="index.css" />
|
|
7
|
+
</head>
|
|
8
|
+
<body>
|
|
9
|
+
<div id="chartdiv"></div>
|
|
10
|
+
<script src="dist/index.js"></script>
|
|
11
|
+
</body>
|
|
12
|
+
</html>
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import * as am5 from "@amcharts/amcharts5";
|
|
2
|
+
import * as am5xy from "@amcharts/amcharts5/xy";
|
|
3
|
+
import * as am5plugins_json from "@amcharts/amcharts5/plugins/json";
|
|
4
|
+
|
|
5
|
+
const root = am5.Root.new("chartdiv");
|
|
6
|
+
|
|
7
|
+
new am5plugins_json.JsonParser().parse(root, {
|
|
8
|
+
name: "XYChart",
|
|
9
|
+
settings: {
|
|
10
|
+
panX: false,
|
|
11
|
+
panY: false,
|
|
12
|
+
wheelX: "panX",
|
|
13
|
+
wheelY: "zoomX",
|
|
14
|
+
},
|
|
15
|
+
children: [
|
|
16
|
+
],
|
|
17
|
+
}).then((chart) => {
|
|
18
|
+
root.container.children.push(chart);
|
|
19
|
+
|
|
20
|
+
// Add cursor
|
|
21
|
+
// https://www.amcharts.com/docs/v5/charts/xy-chart/cursor/
|
|
22
|
+
const cursor = chart.set("cursor", am5xy.XYCursor.new(root, {
|
|
23
|
+
behavior: "zoomX"
|
|
24
|
+
}));
|
|
25
|
+
cursor.lineY.set("visible", false);
|
|
26
|
+
|
|
27
|
+
let date = new Date();
|
|
28
|
+
date.setHours(0, 0, 0, 0);
|
|
29
|
+
let value = 100;
|
|
30
|
+
|
|
31
|
+
function generateData() {
|
|
32
|
+
value = Math.round((Math.random() * 10 - 5) + value);
|
|
33
|
+
am5.time.add(date, "day", 1);
|
|
34
|
+
return {
|
|
35
|
+
date: date.getTime(),
|
|
36
|
+
value: value
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function generateDatas(count: number) {
|
|
41
|
+
const data = [];
|
|
42
|
+
for (let i = 0; i < count; ++i) {
|
|
43
|
+
data.push(generateData());
|
|
44
|
+
}
|
|
45
|
+
return data;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
// Create axes
|
|
50
|
+
// https://www.amcharts.com/docs/v5/charts/xy-chart/axes/
|
|
51
|
+
const xAxis = chart.xAxes.push(am5xy.DateAxis.new(root, {
|
|
52
|
+
maxDeviation: 0,
|
|
53
|
+
baseInterval: {
|
|
54
|
+
timeUnit: "day",
|
|
55
|
+
count: 1
|
|
56
|
+
},
|
|
57
|
+
renderer: am5xy.AxisRendererX.new(root, {}),
|
|
58
|
+
tooltip: am5.Tooltip.new(root, {})
|
|
59
|
+
}));
|
|
60
|
+
|
|
61
|
+
const yAxis = chart.yAxes.push(am5xy.ValueAxis.new(root, {
|
|
62
|
+
renderer: am5xy.AxisRendererY.new(root, {})
|
|
63
|
+
}));
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
// Add series
|
|
67
|
+
// https://www.amcharts.com/docs/v5/charts/xy-chart/series/
|
|
68
|
+
const series = chart.series.push(am5xy.ColumnSeries.new(root, {
|
|
69
|
+
name: "Series",
|
|
70
|
+
xAxis: xAxis,
|
|
71
|
+
yAxis: yAxis,
|
|
72
|
+
valueYField: "value",
|
|
73
|
+
valueXField: "date",
|
|
74
|
+
tooltip: am5.Tooltip.new(root, {
|
|
75
|
+
labelText: "{valueY}"
|
|
76
|
+
})
|
|
77
|
+
}));
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
// Add scrollbar
|
|
81
|
+
// https://www.amcharts.com/docs/v5/charts/xy-chart/scrollbars/
|
|
82
|
+
chart.set("scrollbarX", am5.Scrollbar.new(root, {
|
|
83
|
+
orientation: "horizontal"
|
|
84
|
+
}));
|
|
85
|
+
|
|
86
|
+
let data = generateDatas(50);
|
|
87
|
+
series.data.setAll(data);
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
// Make stuff animate on load
|
|
91
|
+
// https://www.amcharts.com/docs/v5/concepts/animations/#Forcing_appearance_animation
|
|
92
|
+
series.appear(1000);
|
|
93
|
+
chart.appear(1000, 100);
|
|
94
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"private": true,
|
|
3
|
+
"name": "amcharts5-example-json",
|
|
4
|
+
"version": "0.1.0",
|
|
5
|
+
"devDependencies": {
|
|
6
|
+
"@amcharts/amcharts5": "^5.1.10",
|
|
7
|
+
"source-map-loader": "^3.0.0",
|
|
8
|
+
"ts-loader": "^9.2.2",
|
|
9
|
+
"typescript": "^4.3.4",
|
|
10
|
+
"webpack": "^5.1.3",
|
|
11
|
+
"webpack-cli": "^4.1.0",
|
|
12
|
+
"webpack-dev-server": "^3.11.0"
|
|
13
|
+
},
|
|
14
|
+
"scripts": {
|
|
15
|
+
"build": "webpack",
|
|
16
|
+
"start": "webpack serve --mode development"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
var $path = require("path");
|
|
2
|
+
|
|
3
|
+
module.exports = {
|
|
4
|
+
mode: "production",
|
|
5
|
+
|
|
6
|
+
devtool: "source-map",
|
|
7
|
+
|
|
8
|
+
stats: "errors-warnings",
|
|
9
|
+
|
|
10
|
+
target: ["web", "es5"],
|
|
11
|
+
|
|
12
|
+
entry: {
|
|
13
|
+
index: "./index.ts",
|
|
14
|
+
},
|
|
15
|
+
|
|
16
|
+
devServer: {
|
|
17
|
+
publicPath: "/dist/",
|
|
18
|
+
liveReload: true,
|
|
19
|
+
overlay: true,
|
|
20
|
+
noInfo: true,
|
|
21
|
+
open: true
|
|
22
|
+
},
|
|
23
|
+
|
|
24
|
+
output: {
|
|
25
|
+
path: $path.join(__dirname, "dist"),
|
|
26
|
+
publicPath: "dist/",
|
|
27
|
+
filename: "[name].js",
|
|
28
|
+
chunkFilename: "[name].js"
|
|
29
|
+
},
|
|
30
|
+
|
|
31
|
+
resolve: {
|
|
32
|
+
extensions: [".ts", ".tsx", ".js"]
|
|
33
|
+
},
|
|
34
|
+
|
|
35
|
+
module: {
|
|
36
|
+
rules: [{
|
|
37
|
+
test: /.tsx?$/,
|
|
38
|
+
loader: "ts-loader"
|
|
39
|
+
}, {
|
|
40
|
+
test: /.js$/,
|
|
41
|
+
use: ["source-map-loader"],
|
|
42
|
+
enforce: "pre"
|
|
43
|
+
}]
|
|
44
|
+
}
|
|
45
|
+
};
|