Skip to content

Commit d18b02a

Browse files
committed
Update InvertedChart example
1 parent 7e2a729 commit d18b02a

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

examples/InvertedChart/App.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ Highcharts.setOptions({
1010
lang: { thousandsSep: '' }
1111
});
1212

13-
// Generates 1992-93 through 2016-17
14-
const seasons = Array.from({length: 25}, (v, k) => {
13+
// Generates 1992-93 through 2017-18
14+
const seasons = Array.from({length: 26}, (v, k) => {
1515
const year = k + 1992;
1616
return `${year}-${(year + 1).toString().substr(2)}`
1717
});
@@ -24,12 +24,12 @@ class App extends Component {
2424
this.state = {
2525
seasons,
2626
totalGoals: [
27-
1222, 1195, 1195, 988, 970, 1019, 959, 1060, 992, 1001, 1000, 1012,
28-
974, 944, 931, 1002, 942, 1053, 1063, 1066, 1063, 1052, 975, 1026, 1064
27+
1222, 1195, 1195, 988, 970, 1019, 959, 1060, 992, 1001, 1000, 1012, 974,
28+
944, 931, 1002, 942, 1053, 1063, 1066, 1063, 1052, 975, 1026, 1064, 1018
2929
],
3030
avgGoalsPerGame: [
31-
2.65, 2.59, 2.59, 2.6, 2.55, 2.68, 2.52, 2.79, 2.61, 2.63, 2.63, 2.66,
32-
2.56, 2.48, 2.45, 2.64, 2.48, 2.77, 2.8, 2.81, 2.8, 2.77, 2.57, 2.7, 2.8
31+
2.65, 2.59, 2.59, 2.6, 2.55, 2.68, 2.52, 2.79, 2.61, 2.63, 2.63, 2.66, 2.56,
32+
2.48, 2.45, 2.64, 2.48, 2.77, 2.8, 2.81, 2.8, 2.77, 2.57, 2.7, 2.8, 2.68
3333
]
3434
};
3535
}
@@ -57,7 +57,7 @@ class App extends Component {
5757
<HighchartsChart plotOptions={plotOptions}>
5858
<Chart inverted marginLeft={300} height={650} />
5959

60-
<Title>Premier League Goal Stats: 1992-93 to 2016-17</Title>
60+
<Title>Premier League Goal Stats: 1992-93 to 2017-18</Title>
6161

6262
<Subtitle>Source: myfootballfacts.com</Subtitle>
6363

@@ -69,7 +69,7 @@ class App extends Component {
6969
<AreaSplineSeries name="Total Goals" data={totalGoals} color="#38003c" />
7070
</YAxis>
7171

72-
<YAxis min={2.4} max={5} gridLineWidth={0} labels={{ enabled: false }}>
72+
<YAxis min={2.4} max={7} gridLineWidth={0} labels={{ enabled: false }}>
7373
<AreaSplineSeries name="Average Goals per Game" data={avgGoalsPerGame} color="#e90052" />
7474
</YAxis>
7575

examples/InvertedChart/exampleCode.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ render () {
3434
<AreaSplineSeries name="Total Goals" data={totalGoals} color="#38003c" />
3535
</YAxis>
3636
37-
<YAxis min={2.4} max={5} gridLineWidth={0} labels={{ enabled: false }}>
37+
<YAxis min={2.4} max={7} gridLineWidth={0} labels={{ enabled: false }}>
3838
<AreaSplineSeries name="Average Goals per Game" data={avgGoalsPerGame} color="#e90052" />
3939
</YAxis>
4040

0 commit comments

Comments
 (0)