Revision history [back]

click to hide/show revision 1
initial version

asked 2021-11-25 22:18:24 +0800

kurosabama gravatar image kurosabama

how can i use data with sql database in zkchart?

am trying to use zkchart for my next project, i understand how i to choose the model of chart of type etc

but every example take data from hardcode line like this:

public class LineBasicData {private static final CategoryModel model;

static

{ model = new DefaultCategoryModel(); model.setValue("Tokyo", "Jan", 7); model.setValue("Tokyo", "Feb", 6); model.setValue("Tokyo", "Mar", 9); model.setValue("Tokyo", "Apr", 14); model.setValue("Tokyo", "May", 18); model.setValue("Tokyo", "Jun", 21); model.setValue("Tokyo", "Jul", 25); model.setValue("Tokyo", "Aug", 26); model.setValue("Tokyo", "Sep", 23); model.setValue("Tokyo", "Oct", 18); model.setValue("Tokyo", "Nov", 13); model.setValue("Tokyo", "Dec", 9);

}

public static CategoryModel getCategoryModel() {
    return model;
}

}

any idea how can i fill that line from my database? is arraylist method is doable in here? sorry, am so newb in java

how can i use data with sql database in zkchart?

am trying to use zkchart for my next project, i understand how i to choose the model of chart of type etc

but every example take data from hardcode line like this:

{ public class LineBasicData {private static final CategoryModel model;

static

{ model = new DefaultCategoryModel(); model.setValue("Tokyo", "Jan", 7); model.setValue("Tokyo", "Feb", 6); model.setValue("Tokyo", "Mar", 9); model.setValue("Tokyo", "Apr", 14); model.setValue("Tokyo", "May", 18); model.setValue("Tokyo", "Jun", 21); model.setValue("Tokyo", "Jul", 25); model.setValue("Tokyo", "Aug", 26); model.setValue("Tokyo", "Sep", 23); model.setValue("Tokyo", "Oct", 18); model.setValue("Tokyo", "Nov", 13); model.setValue("Tokyo", "Dec", 9);

}

public static CategoryModel getCategoryModel() {
    return model;
}

}}}

any idea how can i fill that line from my database? is arraylist method is doable in here? sorry, am so newb in java

how can i use data with sql database in zkchart?

am trying to use zkchart for my next project, i understand how i to choose the model of chart of type etc

but every example take data from hardcode line like this:

{
public class LineBasicData {private static final CategoryModel model;

model; static

{ model = new DefaultCategoryModel(); model.setValue("Tokyo", "Jan", 7); model.setValue("Tokyo", "Feb", 6); model.setValue("Tokyo", "Mar", 9); model.setValue("Tokyo", "Apr", 14); model.setValue("Tokyo", "May", 18); model.setValue("Tokyo", "Jun", 21); model.setValue("Tokyo", "Jul", 25); model.setValue("Tokyo", "Aug", 26); model.setValue("Tokyo", "Sep", 23); model.setValue("Tokyo", "Oct", 18); model.setValue("Tokyo", "Nov", 13); model.setValue("Tokyo", "Dec", 9);

9);

    }

 public static CategoryModel getCategoryModel() {
     return model;
 }
}}

}}

any idea how can i fill that line from my database? is arraylist method is doable in here? sorry, am so newb in java

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More