docs: @SuppressWarnings("deprecation")
  	private JFreeChart createChart(CategoryDataset dataset) {
  
  //		String s = name;
  		String s = null;
  		String tit = null;
  		String ax = null;
  //		if (first)
  //			tit = title + " (EST)";
  //		else if (last)
  //			ax = "Time";
  
  		tit = this.name;
  		
          chart = ChartFactory.createStackedBarChart(
              tit,  // chart title
              s,                  // domain axis label
              ax,                     // range axis label
              dataset,                     // data
              PlotOrientation.HORIZONTAL,    // the plot orientation
              false,                        // legend
              false,                       // tooltips
              false                        // urls
          );
          CategoryPlot plot = chart.getCategoryPlot();
  
          chart.getTitle().setHorizontalAlignment(HorizontalAlignment.LEFT);
          plot.setRangeAxisLocation(AxisLocation.BOTTOM_OR_RIGHT);
  
          //plot.getCategories();
          //CategoryItemRenderer renderer = plot.getRenderer();
          StackedBarRenderer renderer = (StackedBarRenderer) plot.getRenderer();
          renderer.setItemLabelsVisible(true);
          renderer.setItemLabelGenerator(new LabelGenerator(showlabels));
          ItemLabelPosition pos = new ItemLabelPosition(ItemLabelAnchor.INSIDE1, TextAnchor.TOP_RIGHT);
      	renderer.setPositiveItemLabelPositionFallback(pos);
          for(int i = 0; i < dataset.getRowCount(); i++) {
          	renderer.setSeriesPositiveItemLabelPosition(i, pos);
          }
          
          /*
          if (values.elementAt(0) instanceof ResourceLevel) {
          	renderer.setItemLabelGenerator( new PlotBoxTL.LabelGenerator(true));
          }
          else
          	renderer.setItemLabelGenerator( new PlotBoxTL.LabelGenerator(false));
          */
          renderer.setToolTipGenerator(new PlotBoxTooltip());
          plot.setRenderer(renderer);
         // renderer.getSeriesStroke(0).
          plot.setForegroundAlpha(0.8f);
                          
          NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis();
          rangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
          rangeAxis.setLowerMargin(2.0);
          rangeAxis.setUpperMargin(2.0);
          
          //long origin = stl.getSerializableSimpleTimeline().getEarliestStartTime();
          //long horizon = stl.getSerializableSimpleTimeline().getLatestEndTime();
          long origin = stl.getPulses()[0].longValue();
          NumberFormat nf = new DecimalFormat();
          rangeAxis.setNumberFormatOverride ( nf ); 
          if (this.range != null) rangeAxis.setRange(range);
          //rangeAxis.setRange((new Double(origin)).doubleValue(), (new Double(horizon)).doubleValue());
     
          ///// 0 should be replaced by the start of the horizon
          renderer.setBase(origin);
          
          //renderer.setBase();
          
          
  
          for (int i = 0; i < durations.length; i++) {
  	        if (stl.isInconsistent(values[i]))
  	        	renderer.setSeriesPaint(i, new Color(198, 30, 69));
  	        else if (stl.isCritical(values[i]))
  	        		renderer.setSeriesPaint(i, new Color(238,234,111));
  	        else if (stl.isUndetermined(values[i]))
          		renderer.setSeriesPaint(i, new Color(255,255,255));
          	else renderer.setSeriesPaint(i, new Color(111,180,238));
          	renderer.setSeriesOutlinePaint(i, Color.black);
  		}
          
          renderer.setBaseSeriesVisibleInLegend(false, false);
          
          renderer.setSeriesStroke(0, new BasicStroke(40f));
          
          return chart;
  	}