1

I have UI requirement with ling graph, the graph will be have icons above xaxis just like google weather app UI. Following image is reference.

enter image description here

Like above image wee need to display icons for the graph.I have previously used MPAndroidChart. I have tried different concepts available in google and SO. still unable achieve this UI.

I have followed following articles

To show icons in bar chart

When any value click showing icon

If anyone knows how to implement this UI, help me out.

YBDevi
  • 439
  • 5
  • 22
  • Did you try using canvas along with horizontal recyclerview? – Karthik Oct 22 '19 at 12:26
  • @Karrthik i need graph also if u see the image based on value it will up and down with recyclerview we can't create the difference. – YBDevi Oct 22 '19 at 12:48
  • Actually we can do it using canvas, dividing the height into equal parts using temperature vertically for each item, selecting the part for each recyclerview item based on the temperture and drawing a border accordingly filling the below space with that particular color. – Karthik Oct 22 '19 at 12:55
  • Give me two days, I will try this out and will let you know. – Karthik Oct 22 '19 at 12:56
  • @Karrthik Tq for ur help , in the meanwhile can you give me little bit more explanation so that from my end i will also try. – YBDevi Oct 22 '19 at 12:58
  • In a recycler view try to divide height into equal parts based on the temperatures which is along the y-axis. and dates will be along x-axis. you know the previous day and previous day temperature and you will find the co ordinates (x and y). Get the current day and current day temperature, you will find the next co ordinates where you need to draw a border. And fill the inner part with a different color. Do it for each day. – Karthik Oct 22 '19 at 14:05
  • @Karrthik can you help me regarding this problem, i had tried ur suggestion unable to achieve it. – YBDevi Oct 30 '19 at 06:04

0 Answers0