Posts

Showing posts with the label BarChartView

Bar chart from json array in Sketchware

Image
In Sketchware, to create an app in which data with numerical values can be added and viewed as a Bar chart, follow the steps given below. 1. Create a new project in Sketchware. 2. In  main.xml  add a Button  button1  and a ListView  listview2 . 3. Create a CustomView  items.xml  and add two TextViews in it  textview1  and  textview2 . 4. Select  items.xml  as CustomView of  listview2 . 5. In  MainActivity.java , add a Shared Preferences component  sp:sp , and an Intent component  i . 6. Add a String variable  jsondata , and a ListMap  maplist . 7. In  onCreate  event use blocks to set jsondata to your Json data containing 'text' and 'number' as keys. Convert it to List Map  maplist  and display it in ListView. The Json String used here is: [ { "text" : "Afghan Afghani", "number" : "0.9532" }, { "text" : "Armenian Dram", "number" : "...