Package 

Class Iterator


  • 
    public class Iterator
    extends JsObject
                        

    anychart.data.Iterator class is used to work with data in a View. The iterator allows getting data from a anychart.data.View by crawling through rows. Iterator can be obtained using getIterator method and has methods to control current index and get values from data/metadata fields in a current row.

    • Constructor Summary

      Constructors 
      Constructor Description
      Iterator(String jsChart)
    • Method Summary

      Modifier and Type Method Description
      static Iterator instantiate()
      String getJsBase()
      void advance() Advances the iterator to the next item.
      void get(String fieldName) Gets the value from the current row by the field name.
      void getIndex() Returns the index of the item to which iterator points to.
      void getRowsCount() Returns the number of rows in the view.
      void meta(String name) Gets the metadata value by the field name.
      Iterator meta(String name, String value) Sets metadata value by the field name.
      Iterator reset() Resets the data iterator to its zero state (before the first item of the view).
      void select(Number index) Sets a passed index as the current index and returns it in case of success.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Iterator

        Iterator(String jsChart)
    • Method Detail

      • advance

         void advance()

        Advances the iterator to the next item.

      • get

         void get(String fieldName)

        Gets the value from the current row by the field name.

      • getIndex

         void getIndex()

        Returns the index of the item to which iterator points to.

      • getRowsCount

         void getRowsCount()

        Returns the number of rows in the view.

      • meta

         void meta(String name)

        Gets the metadata value by the field name.

      • reset

         Iterator reset()

        Resets the data iterator to its zero state (before the first item of the view).

      • select

         void select(Number index)

        Sets a passed index as the current index and returns it in case of success.