Skip to content

Commit 5ba5509

Browse files
gfrnndg63276
andauthored
LIMS-1589 - Remove Highcharts (#878)
* Remove touchscreen app * Remove unused dependencies * Remove local version of jquery-flot-pie * Remove aliased dependencies * Remove unused app file, dead dependencies * Remove unused vendor files * Remove unused dependencies * Remove Highcharts and Moment dependencies * Reinstate call to plotYears Co-authored-by: Mark W <24956497+ndg63276@users.noreply.github.com> --------- Co-authored-by: Mark W <24956497+ndg63276@users.noreply.github.com>
1 parent d262edf commit 5ba5509

File tree

7 files changed

+22
-4565
lines changed

7 files changed

+22
-4565
lines changed

api/src/Page.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ function auth($require_staff)
221221
if ($require_staff)
222222
{
223223
$auth = $this->staff;
224+
224225
}
225226
// Barcode Scanners
226227
else if ($this->bcr() && !$this->user->loginId)

client/package-lock.json

Lines changed: 20 additions & 28 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"imports-loader": "^0.8.0",
3939
"jest-environment-jsdom": "^29.5.0",
4040
"mini-css-extract-plugin": "^2.6.1",
41-
"postcss": "^8.1.14",
41+
"postcss": "^8.4.31",
4242
"postcss-color-function": "^4.1.0",
4343
"postcss-extend-rule": "^3.0.0",
4444
"postcss-import": "^13.0.0",
@@ -60,7 +60,6 @@
6060
"webpack-dev-server": "^4.11.1"
6161
},
6262
"dependencies": {
63-
"@highcharts/map-collection": "^1.1.2",
6463
"backbone": "1.1.2",
6564
"backbone-validation": "0.9.1",
6665
"backbone.marionette": "2.1.0",
@@ -79,7 +78,6 @@
7978
"flot-axislabels": "^1.0.0",
8079
"flot-pie": "^1.0.0",
8180
"font-awesome": "^4.2.0",
82-
"highcharts": "^7.2.2",
8381
"jquery": "^1.12.4",
8482
"jquery-color": "^3.0.0-alpha.1",
8583
"jquery-flot-resize": "^1.0.0",

client/src/js/modules/shipment/views/dewarstats.js

Lines changed: 0 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,13 @@ define(['marionette',
44
'views/table',
55
'utils/table',
66
'utils',
7-
'highmaps',
8-
'highmaps-world',
97
'templates/shipment/dewarstats.html', 'jquery.flot', 'jquery.flot.tooltip'],
108
function(Marionette,
119
DewarOverview,
1210
Runs,
1311
TableView,
1412
table,
1513
utils,
16-
Highcharts,
17-
HighchartsWorldMap, // Needs to be loaded to provide custom/world map
1814
template) {
1915

2016

@@ -80,7 +76,6 @@ define(['marionette',
8076

8177

8278
initialize: function() {
83-
console.log(Highcharts)
8479
this.run = new DewarOverview(null, { queryParams: { group_by: 'year' } })
8580
this.countries = new SortedDewars(null, { queryParams: { group_by: 'country' } })
8681
this.countries.state.pageSize = 25
@@ -141,17 +136,11 @@ define(['marionette',
141136
backgrid: { emptyText: 'No dewar stats found' }
142137
}))
143138

144-
this.listenTo(this.countries, 'sync', this.plotMap)
145-
this.plotMap()
146139
},
147140

148-
149141
onShow: function() {
150142
this.listenTo(this.run, 'sync', this.plotYears)
151-
this.plotMap()
152143
},
153-
154-
155144
plotYears: function() {
156145
var ticks = []
157146
var cols = utils.getColors(3)
@@ -183,60 +172,6 @@ define(['marionette',
183172

184173
$.plot(this.ui.years, data, options)
185174
},
186-
187-
188-
plotMap: function() {
189-
var data = []
190-
this.countries.fullCollection.each(function(c) {
191-
if (c.get('CODE')) data.push({ code: c.get('CODE'), value: parseInt(c.get('DEWARS')) })
192-
})
193-
194-
var num = 5
195-
var cols = utils.getColors(num)
196-
var stops = []
197-
_.each(_.range(num), function(n) {
198-
stops.push([(1/num)*n, cols[n]])
199-
})
200-
201-
Highcharts.mapChart({
202-
chart: {
203-
renderTo: this.ui.map[0],
204-
backgroundColor:'rgba(255, 255, 255, 0.0)',
205-
map: 'custom/world'
206-
},
207-
208-
title: {
209-
text: 'Dewar breakdown by Country'
210-
},
211-
212-
mapNavigation: {
213-
enabled: true,
214-
buttonOptions: {
215-
verticalAlign: 'bottom'
216-
}
217-
},
218-
219-
colorAxis: {
220-
min: 1,
221-
type: 'logarithmic',
222-
stops: stops,
223-
},
224-
225-
series: [{
226-
data: data,
227-
joinBy: ['iso-a2', 'code'],
228-
states: {
229-
hover: {
230-
color: '#a4edba'
231-
}
232-
},
233-
dataLabels: {
234-
enabled: true,
235-
format: '{point.properties.postal}'
236-
}
237-
}]
238-
});
239-
},
240175

241176
})
242177

client/src/js/templates/shipment/dewarstats.html

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,5 @@
1919
<h1>By Year</h1>
2020
<div class="runs"></div>
2121

22-
<div class="plot_container">
23-
<div id="avg_time" class="large map"></div>
24-
</div>
2522
<h1>By Country</h1>
2623
<div class="countries"></div>

0 commit comments

Comments
 (0)