@Override
  public Void processInBackground(Context context) throws Exception {
    UserSettings userSettings = context.getUserSettings();
    List<PropertyGroup> groups = null;
    if (userSettings != null) {
      groups = userSettings.getPropertiesDisplayOptions().get(model.getResourceType());
    }
    CategoryProcessorContext categoryCtx = new CategoryProcessorContext(node, context);

    // Categories must be selected in the model first and then optionally
    // PropertyGroups can be defined and you can specify which categories
    // you want included in each group
    if (groups != null) {
      for (PropertyGroup group : groups) {
        if (group.isDisplayed()) {
          DevicePropertyGroup pageGroup = createGroup(group);
          for (PropertyCategory category : group.getCategories()) {
            model.addCategory(category);
            pageGroup.addCategory(category.getResourceCategory());
          }
          model.addPropertyGroup(pageGroup);
        }
      }
    }

    for (DevicePropertyCategory pageCategory : model.getCategories()) {
      pageCategory.populate(categoryCtx);
    }
    return null;
  }
  @Override
  public void modelChanged(DevicePropertyCategory model) {
    double[] values = (double[]) model.getProperty(SL).getObject();

    int numSCs = (Integer) model.getProperty(SC).getObject();

    final XYSeries xyseries = new XYSeries("");

    int x = 0;
    for (double v : values) {

      xyseries.add(x++, v);
    }
    dataset.addSeries(xyseries);

    chartPanel.getChart().getXYPlot().getDomainAxis().setRange(0, numSCs);
  }