Git Product home page Git Product logo

smswithoutborders-telemetry-fe's Introduction

smswithoutborders-telemetry-fe's People

Contributors

mildrette avatar promisefru avatar steph237 avatar vanessa-kris avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

smswithoutborders-telemetry-fe's Issues

Remove unused files

  • Remove main.js from the root of the repository
  • Rename assets/Js to assets/js

Chart category values should plot in ascending order

For category months, values should start from January to December respectively. Month orders shouldn't be mixed up. e.g data contains months August, December, and February. Chart should plot data in the order February, August, December

Add similar methods to filter_days function

if (type == "available") {
let previous_months_count = 0;
entry.forEach((element) => {
let search_month = new Date(element.date).toLocaleDateString()
let start_month_modified = new Date(new Date(start_date).getFullYear(), new Date(start_date).getMonth(), 1).toLocaleDateString()
let end_month_modified = new Date(new Date(end_date).getFullYear(), new Date(end_date).getMonth() + 1, 0).toLocaleDateString()
if (
new Date(search_month) >= new Date(start_month_modified) &&
new Date(search_month) <= new Date(end_month_modified) &&
element.type == type
) {
filter_data.push(month[new Date(element.date).getMonth()]);
}
if (
new Date(search_month) < new Date(start_month_modified) &&
element.type == type
) {
previous_months_count += 1;
}
});
let data = {};
filter_data.forEach((element) => {
data[element] = (data[element] || 0) + 1;
});
let result = Object.keys(data).sort(function (a, b) {
return month.indexOf(a) > month.indexOf(b);
}).map((key, index, array) => {
previous_months_count += (data[array[index - 1]] || 0)
return [key, data[key] + previous_months_count];
});
return result;
} else {

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.