Skip to content

Commit 4774cca

Browse files
committed
style(frontend): use camelCase for parameter names
1 parent 14c3cf8 commit 4774cca

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

frontend/src/utils/commonCharts.js

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,17 @@ export const CHART_COMMON_OPTIONS = {
3636
}
3737

3838
/**
39-
* Sets chart datetime range if both `dt_from` and `dt_to` are provided
39+
* Sets chart datetime range if both `dtFrom` and `dtTo` are provided
4040
* @param {Object} chartScaleXOptions Options for the X axis
41-
* @param {String} dt_from Start date and time formatted like "1970-01-01T01:23"
42-
* @param {String} dt_to End date and time formatted like "1970-01-01T01:23"
41+
* @param {String} dtFrom Start date and time formatted like "1970-01-01T01:23"
42+
* @param {String} dtTo End date and time formatted like "1970-01-01T01:23"
43+
* @returns {undefined}
4344
*/
44-
export function setChartDatetimeRange(chartScaleXOptions, dt_from, dt_to) {
45-
if (dt_from && dt_to) {
45+
export function setChartDatetimeRange(chartScaleXOptions, dtFrom, dtTo) {
46+
if (dtFrom && dtTo) {
4647
// + 'Z' to treat as UTC
47-
chartScaleXOptions.min = new Date(dt_from + 'Z')
48-
chartScaleXOptions.max = new Date(dt_to + 'Z')
48+
chartScaleXOptions.min = new Date(dtFrom + 'Z')
49+
chartScaleXOptions.max = new Date(dtTo + 'Z')
4950
}
5051
}
5152

0 commit comments

Comments
 (0)