Git Product home page Git Product logo

kibana_calendar_vis's People

Contributors

aaronoah avatar ashwinkumar6 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

kibana_calendar_vis's Issues

First week Jan, last week Dec getting cropped

  • A year can consist of 52/53 weeks.
  • The starting week of the year could vary depending on region,
    From moment.js documentation:
- The week of the year varies depending on which day is the first day of the week (Sunday, Monday, etc), and which week is the first week of the year.
- For example, in the United States, Sunday is the first day of the week. The week with January 1st in it is the first week of the year.
- In France, Monday is the first day of the week, and the week with January 4th is the first week of the year.
  • This would mean,
    • moment.week() on the last week of December could return a 53 / 52 / 1
    • moment.week() on the first week of January could return a 53 / 52 / 1
  • Currently this is not handled in the yearView and the monthView and would result in (refer screenshots)
    • yearView: last week of December or first week of January getting cropped
    • monthView: Only last week of December or first week of January is displayed rest of the weeks are cropped

Expected Behaviour

  • While rendering the chart grids in chart_grid.js for YearView and monthView, add conditions to handle the following scenarios
    • last week of December could be a 53 / 52 / 1
    • first week of January could be a 53 / 52 / 1

Actual Behaviour

  • Currently the chart assumes that the last week of December ends in week 52 and first week of Jan starts in week 1

Basic Information
kibana version: 6.4

Screenshots
yearView (Dec 2018): last week of Dec getting cropped
YearView(Dec)

yearView (Jan 2019): first week of Jan getting cropped
YearView(jan)

monthView (Jan 2019): only first week of Jan displayed
monthView

legend colour not visible

  • In the screenshot attached below the lowest category is 0-252 and the hex colour is #f7fbff this is too light and not visible.
  • This can noticed with colours green, blue, greys and red

Expected Behaviour
The colour used to represent the lowest range in the legend be visible on the chart.

Actual Behaviour
The colour used to represent the lowest range in the legend isn't visible on the chart. Probably a darker shade could be used

Basic Information
kibana version: 6.4

Screenshots
calendar_color

6.5.4 Support

Any plans to update this to be compatible with 6.5.4?

Condition to switch between day, month, year view

  • The calendar_vis has three types of views
    • Day view
    • Month view
    • Year view
  • Currently the condition used to determine when to switch between the 3 types of views are as follows
// get the difference between to and from
const diff = to.diff(from, 'days');

// render a day view
if (diff <= 1)
// render a month view
else if (diff > 1 && diff < 32 && new Date(from).getMonth() === new Date(to).getMonth())
// render a year view
else if (diff > 31)

There a couple or corner cases which this will not handle

  • Scenario 1
    currentDate: 01/03/2019 12:05am
    1h from today would render a day view since diff<1 but a year view is expected since range lies across months
  • Scenario 2
    currentDate: 05/03/2019 12:05am
    1h from today would render a day view since diff<1 but a month view is expected since range lies across two days

The condition should not be based on the difference between to and from instead, based on the day/month/year they lie in, such as the conditions below

// render a day view 
if ( moment(new Date(from)).format("MMM Do YY") === moment(new Date(to)).format("MMM Do YY") ) 
// render a month view
else if (new Date(from).getMonth() === new Date(to).getMonth()  && new Date(from).getFullYear() === new Date(to).getFullYear())
// render a year view
else

Expected Behaviour
Condition used to determine when to switch between the 3 types of views be based on the day/month/year they lie in

Actual Behaviour
Condition used to determine when to switch between the 3 types of views are based on the based on the difference between to and from

Basic Information
kibana version: 6.4

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.