public void setData(String title, String yleg, final TimeSeriesCollection tsc) {		
		JFreeChart chart = ChartFactory.createTimeSeriesChart(
				title, "Date", yleg, tsc, true, true, false);
		XYPlot plot = (XYPlot) chart.getPlot();

        XYLineAndShapeRenderer renderer = new XYLineAndShapeRenderer(){
			private static final long serialVersionUID = 1L;
            @Override
            public Paint getItemPaint(int row, int column) {
            	Paint col;
            	if (row == 0) {
            		col = Color.pink;
            	} else {
            		col = Color.cyan;
            	}
            	
                long x = (long)tsc.getXValue(row, column);
                // Ha az adott idpont egy tarts rendszerkimarads intervallumba esik, akkor a jell pont fekete lesz. 
            	for (int i = 0; i < (sysdown.size() - 1); i += 2) {
            		if ((x >= sysdown.get(i)) && (x <= sysdown.get(i+1))) {
            			return Color.black;
            		}
            	}
                // Ha az adott idpont beleesik a szenzor tarts kimaradsa intervallumba a jell pont szine lecserldik.
            	for (int i = 0; i < (sensor.getHeavyLoss().size() - 1); i += 2) {
            		if ((x > sensor.getHeavyLoss().get(i)) && (x < sensor.getHeavyLoss().get(i+1))) {
            			return col;
            		}
            	}
            	return super.getItemPaint(row, column);
            }
            @Override
            public boolean getItemLineVisible(int series, int item) {
            	if (series == 0) return false;
            	else return true;
            }
        };
        renderer.setSeriesShape(0, circle);
        renderer.setSeriesShape(1, circle);
        renderer.setBaseStroke(new BasicStroke(1));
        plot.setRenderer(renderer);
		chart_panel.setChart(chart);
	}