Timelion visualization

Hi,

i use kibana 7.7.0 ,
this is my data documents :
{"took":0,"timed_out":false,"_shards":{"total":1,"successful":1,"skipped":0,"failed":0},"hits":{"total":{"value":8,"relation":"eq"},"max_score":1,"hits":[{"_index":"hotels-v3","_type":"_doc","_id":"Y7ZzzXMB-du1_YivD2N9","_score":1,"_source":{"hotelId":103,"hotelName":"Iberostar Diar El Andalous 5","status":"success","zoneId":41,"cityId":11,"countryId":"TN","hotelZone":"","hotelCity":"Sousse","hotelCountry":"Tunisie","hotelAddress":"Port el kantaoui ,Sousse","location":{"lat":35.77799,"long":10.82617},"hotelPhone":73275420,"rating":5,"hotelChainId":"","hotelChain":"","rooms":[{"roomId":"19","roomName":"Chambre triple classique vue piscine Standard Vue piscine","rates":[{"arrDate":"2020-03-15","depDate":"2020-03-20","contractId":"591","contractType":"sold","contractName":"xxxxx","availability":{"dispo":4,"vendu":2},"price":700,"purchase":200,"boardCode":"40","boardName":"Demi pension"}],"quantity":4},{"roomId":"16","roomName":"single standard","rates":[{"arrDate":"2020-03-16","depDate":"2020-03-22","contractId":"583","contractType":"sold","contractName":"xxxxx","availability":{"dispo":10,"vendu":3},"price":450,"purchase":140,"boardCode":"40","boardName":"Pension complète"}],"quantity":14}]}},{"_index":"hotels-v3","_type":"_doc","_id":"brZzzXMB-du1_YivLGOW","_score":1,"_source":{"hotelId":104,"hotelName":"Magic Hotels Thabraca 4*","status":"success","zoneId":42,"cityId":13,"countryId":"TN","hotelZone":"","hotelCity":"Tabarka","hotelCountry":"Tunisie","hotelAddress":"Zone touristique","location":{"lat":35.77799,"long":10.82617},"hotelPhone":73275420,"rating":5,"hotelChainId":"","hotelChain":"","rooms":[{"roomId":"20","roomName":"Chambre Single Standard Vue Jardin","rates":[{"arrDate":"2020-03-11","depDate":"2020-03-14","contractId":"592","contractType":"sold","contractName":"xxxxx","availability":{"dispo":3,"vendu":0},"price":"","purchase":80,"boardCode":"40","boardName":"Demi pension"}],"quantity":3},{"roomId":"16","roomName":"single standard","rates":[{"arrDate":"2020-03-20","depDate":"2020-03-25","contractId":"583","contractType":"sold","contractName":"xxxxx","availability":{"dispo":5,"vendu":0},"price":"","purchase":150,"boardCode":"40","boardName":"Pension complète"}],"quantity":5},{"roomId":"15","roomName":"double","rates":[{"arrDate":"2020-03-15","depDate":"2020-03-19","contractId":"583","contractType":"sold","contractName":"xxxxx","availability":{"dispo":16,"vendu":15},"price":"500","purchase":120,"boardCode":"40","boardName":"Pension complète"}],"quantity":16}]}},{"_index":"hotels-v3","_type":"_doc","_id":"ebZzzXMB-du1_YivQ2ME","_score":1,"_source":{"hotelId":101,"hotelName":"Magic Hotels Royal Kenz 4*","status":"success","zoneId":40,"cityId":11,"countryId":"TN","hotelZone":"","hotelCity":"Sousse","hotelCountry":"Tunisie","hotelAddress":"Port kantaoui Hammam Sousse","location":{"lat":35.77799,"long":10.82617},"hotelPhone":73275420,"rating":4,"hotelChainId":"","hotelChain":"","rooms":[{"roomId":"18","roomName":"Promo room triple","rates":[{"arrDate":"2020-02-12","depDate":"2020-02-15","contractId":"590","contractType":"sold","contractName":"xxxxx","availability":{"dispo":0,"vendu":15},"price":220,"purchase":160,"boardCode":"40","boardName":"Demi pension"}],"quantity":15},{"roomId":"16","roomName":"single standard","rates":[{"arrDate":"2020-02-20","depDate":"2020-02-26","contractId":"580","contractType":"sold","contractName":"xxxxx","availability":{"dispo":0,"vendu":20},"price":560,"purchase":90,"boardCode":"40","boardName":"Pension complète"}],"quantity":20}]}},{"_index":"hotels-v3","_type":"_doc","_id":"hLZzzXMB-du1_YivV2ON","_score":1,"_source":{"hotelId":100,"hotelName":"Les Colombes 3*","status":"success","zoneId":30,"cityId":10,"countryId":"TN","hotelZone":"","hotelCity":"Hammamet","hotelCountry":"Tunisie","hotelAddress":"Route Touristique El Mrazga, Hammamet 8050","location":{"lat":35.77799,"long":10.82617},"hotelPhone":72322777,"rating":3,"hotelChainId":"","hotelChain":"","rooms":[{"roomId":"15","roomName":"DOUBLE","rates":[{"arrDate":"2020-01-01","depDate":"2020-01-03","contractId":"580","contractType":"sold","contractName":"xxxxx","availability":{"dispo":12,"vendu":10},"price":160,"purchase":120,"boardCode":"40","boardName":"Demi pension"}],"quantity":12},{"roomId":"16","roomName":"single standard","rates":[{"arrDate":"2020-01-02","depDate":"2020-01-06","contractId":"580","contractType":"sold","contractName":"xxxxx","availability":{"dispo":22,"vendu":14},"price":130,"purchase":90,"boardCode":"40","boardName":"Pension complète"}],"quantity":22},{"roomId":"17","roomName":"double STANDARD","rates":[{"arrDate":"2020-02-06","depDate":"2020-02-09","contractId":"580","contractType":"sold","contractName":"xxxxx","availability":{"dispo":23,"vendu":19},"price":150,"purchase":100,"boardCode":"40","boardName":"Demi pension"}],"quantity":23}]}},{"_index":"hotels-v3","_type":"_doc","_id":"j7ZzzXMB-du1_YivbGM1","_score":1,"_source":{"hotelId":110,"hotelName":"Movenpick Resort & Marine SPA Sousse 5","status":"success","zoneId":41,"cityId":11,"countryId":"TN","hotelZone":"","hotelCity":"Sousse","hotelCountry":"Tunisie","hotelAddress":"Port el kantaoui ,Sousse","location":{"lat":35.77799,"long":10.82617},"hotelPhone":73275420,"rating":5,"hotelChainId":"","hotelChain":"","rooms":[{"roomId":"19","roomName":"Chambre triple classique vue piscine Standard Vue piscine","rates":[{"arrDate":"2020-03-19","depDate":"2020-03-23","contractId":"591","contractType":"sold","contractName":"xxxxx","availability":{"dispo":2,"vendu":0},"price":720,"purchase":170,"boardCode":"40","boardName":"Demi pension"}],"quantity":2},{"roomId":"16","roomName":"single standard","rates":[{"arrDate":"2020-03-24","depDate":"2020-03-28","contractId":"583","contractType":"sold","contractName":"xxxxx","availability":{"dispo":26,"vendu":15},"price":500,"purchase":130,"boardCode":"40","boardName":"Pension complète"}],"quantity":26}]}},{"_index":"hotels-v3","_type":"_doc","_id":"QqsE6HMB1AjoIOBxodvF","_score":1,"_source":{"hotelId":204,"hotelName":"Tui magic life africana","status":"success","zoneId":30,"cityId":10,"countryId":"TN","hotelZone":"","hotelCity":"Hammamet","hotelCountry":"Tunisie","location":{"lat":35.77799,"long":10.82617},"hotelPhone":73275420,"rating":5,"hotelChainId":"","hotelChain":"","rooms":[{"roomId":"31","roomName":"Chambre Single Standard Vue Jardin","rates":[{"arrDate":"2019-03-20","depDate":"2019-03-21","contractId":"592","contractType":"sold","contractName":"xxxxx","availability":{"dispo":3,"vendu":3},"price":999,"purchase":140,"boardCode":"40","boardName":"Demi pension"}],"quantity":3},{"roomId":"36","roomName":"single standard","rates":[{"arrDate":"2019-03-21","depDate":"2019-03-27","contractId":"583","contractType":"sold","contractName":"xxxxx","availability":{"dispo":5,"vendu":5},"price":1350,"purchase":400,"boardCode":"40","boardName":"Pension complète"}],"quantity":5},{"roomId":"35","roomName":"double","rates":[{"arrDate":"2019-03-02","depDate":"2019-03-06","contractId":"583","contractType":"sold","contractName":"xxxxx","availability":{"dispo":16,"vendu":15},"price":1540,"purchase":300,"boardCode":"40","boardName":"Pension complète"}],"quantity":16}]}},{"_index":"hotels-v3","_type":"_doc","_id":"tKsI6HMB1AjoIOBxH9uZ","_score":1,"_source":{"hotelId":201,"hotelName":"Club marmara palm beach hammamet ","status":"success","zoneId":30,"cityId":10,"countryId":"TN","hotelZone":"","hotelCity":"Hammamet","hotelCountry":"Tunisie","location":{"lat":35.77799,"long":10.82617},"hotelPhone":73275420,"rating":4,"hotelChainId":"","hotelChain":"","rooms":[{"roomId":"38","roomName":"Promo room triple","rates":[{"arrDate":"2019-02-12","depDate":"2019-02-15","contractId":"590","contractType":"sold","contractName":"xxxxx","availability":{"dispo":0,"vendu":15},"price":720,"purchase":260,"boardCode":"40","boardName":"Demi pension"}],"quantity":15},{"roomId":"36","roomName":"single standard","rates":[{"arrDate":"2019-02-20","depDate":"2019-02-26","contractId":"580","contractType":"sold","contractName":"xxxxx","availability":{"dispo":0,"vendu":20},"price":2000,"purchase":1000,"boardCode":"40","boardName":"Pension complète"}],"quantity":20}]}},{"_index":"hotels-v3","_type":"_doc","_id":"06sP6HMB1AjoIOBxU9w6","_score":1,"_source":{"hotelId":300,"hotelName":"Les Colombes 3*","status":"success","zoneId":30,"cityId":10,"countryId":"TN","hotelZone":"","hotelCity":"Hammamet","hotelCountry":"Tunisie","hotelAddress":"Route Touristique El Mrazga, Hammamet 8050","location":{"lat":35.77799,"long":10.82617},"hotelPhone":72322777,"rating":3,"hotelChainId":"","hotelChain":"","rooms":[{"roomId":"35","roomName":"DOUBLE","rates":[{"arrDate":"2019-01-02","depDate":"2019-01-04","contractId":"580","contractType":"sold","contractName":"xxxxx","availability":{"dispo":12,"vendu":10},"price":600,"purchase":90,"boardCode":"40","boardName":"Demi pension"}],"quantity":12},{"roomId":"36","roomName":"single standard","rates":[{"arrDate":"2019-01-03","depDate":"2019-01-04","contractId":"580","contractType":"sold","contractName":"xxxxx","availability":{"dispo":22,"vendu":14},"price":700,"purchase":100,"boardCode":"40","boardName":"Pension complète"}],"quantity":22},{"roomId":"37","roomName":"double STANDARD","rates":[{"arrDate":"2019-02-06","depDate":"2019-02-07","contractId":"580","contractType":"sold","contractName":"xxxxx","availability":{"dispo":23,"vendu":19},"price":800,"purchase":200,"boardCode":"40","boardName":"Demi pension"}],"quantity":23}]}}]}}

i want to compare the two data sets, add another series with data from the previous year (in my case the year 2019 and 2020) with an timelion visualization.

the problem that display the same date for current and last year

Are you referring to the X axis here showing the current date, not the one from last year? If yes, you can't change this - documenting the time shift in the label (as you did already) is the right approach here.

Hi @flash1293 ,

it's the first time i use Timelion visualization, i copy from this article :
https://docs.support.siren.io/10.1.0/platform/en/siren-investigate/timelion/getting-started-with-timelion.html

i don't now if i referring to the X axis to show the current date

I basically meant what you want to say with this sentence:

Can you elaborate what exactly your problem is? Display the same date where? How should it look like?

in the example above , the current year is 2020 the last should be 2019.
but it display the two years "current year :964" , "last year:700" in the same date (january31st2019).

The value in the brackets is the value of the current series on the y axis, not the year. It's the price at the given point in time

so what can i do to compare data with the previous

Can you clarify what you are trying to achieve?

Your visualization is already comparing data with the previous year (964 vs 700).

the year should be (2019,2020)

I see, this is not how Timelion works. The legend in the top left will always show the following information:

<Unshifted date and time at current cursor position>
<Name of first series> (<Value of first series at current cursor position>)
<Name of second series> (<Value of second series at current cursor position>)
...

This is not configurable. To raise awareness for your use case, you can open a feature request here: https://github.com/elastic/kibana/issues/new?template=Feature_request.md

1 Like

thank you,
i will read more about Timelion

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.