Search in sources :

Example 1 with GraphPanelChartExactElement

use of kg.apc.charting.elements.GraphPanelChartExactElement in project jmeter-plugins by undera.

the class GraphRowExactValues method getElement.

@Override
public AbstractGraphPanelChartElement getElement(long value) {
    AbstractGraphPanelChartElement ret = null;
    Iterator<Entry<Long, AbstractGraphPanelChartElement>> it = values.entrySet().iterator();
    while (it.hasNext() && ret == null) {
        GraphPanelChartExactElement el = (GraphPanelChartExactElement) it.next().getValue();
        if (el.getX() == value) {
            ret = el;
        }
    }
    return ret;
}
Also used : Entry(java.util.Map.Entry) GraphPanelChartExactElement(kg.apc.charting.elements.GraphPanelChartExactElement) AbstractGraphPanelChartElement(kg.apc.charting.AbstractGraphPanelChartElement)

Example 2 with GraphPanelChartExactElement

use of kg.apc.charting.elements.GraphPanelChartExactElement in project jmeter-plugins by undera.

the class GraphRowExactValuesTest method testGetElement.

/**
 * Test of getElement method, of class GraphRowExactValues.
 */
@Test
public void testGetElement() {
    System.out.println("getElement");
    long value = 100L;
    GraphRowExactValues instance = new GraphRowExactValues();
    AbstractGraphPanelChartElement expResult = new GraphPanelChartExactElement(value, 2);
    instance.add(value, 2);
    AbstractGraphPanelChartElement result = instance.getElement(value);
    Assert.assertTrue(instance.getElement(value).getValue() == expResult.getValue());
}
Also used : GraphPanelChartExactElement(kg.apc.charting.elements.GraphPanelChartExactElement) AbstractGraphPanelChartElement(kg.apc.charting.AbstractGraphPanelChartElement) GraphRowExactValues(kg.apc.charting.rows.GraphRowExactValues)

Example 3 with GraphPanelChartExactElement

use of kg.apc.charting.elements.GraphPanelChartExactElement in project jmeter-plugins by undera.

the class GraphPanelChartExactElementTest method testGetValue.

/**
 * Test of getValue method, of class GraphPanelChartExactElement.
 */
@Test
public void testGetValue() {
    System.out.println("getValue");
    GraphPanelChartExactElement instance = new GraphPanelChartExactElement(1, 1);
    double expResult = 1.0;
    double result = instance.getValue();
    Assert.assertEquals(expResult, result, 0.0);
}
Also used : GraphPanelChartExactElement(kg.apc.charting.elements.GraphPanelChartExactElement)

Example 4 with GraphPanelChartExactElement

use of kg.apc.charting.elements.GraphPanelChartExactElement in project jmeter-plugins by undera.

the class GraphRowExactValues method add.

/**
 * @param xVal
 * @param yVal
 */
@Override
public void add(long xVal, double yVal) {
    GraphPanelChartExactElement el;
    el = new GraphPanelChartExactElement(xVal, yVal);
    values.put((long) values.size(), el);
    super.add(xVal, yVal);
}
Also used : GraphPanelChartExactElement(kg.apc.charting.elements.GraphPanelChartExactElement)

Example 5 with GraphPanelChartExactElement

use of kg.apc.charting.elements.GraphPanelChartExactElement in project jmeter-plugins by undera.

the class GraphPanelChartExactElementTest method testAdd.

/**
 * Test of add method, of class GraphPanelChartExactElement.
 */
@Test
public void testAdd() {
    System.out.println("add");
    double val = 0.0;
    GraphPanelChartExactElement instance = new GraphPanelChartExactElement(0, 0);
    instance.add(val);
}
Also used : GraphPanelChartExactElement(kg.apc.charting.elements.GraphPanelChartExactElement)

Aggregations

GraphPanelChartExactElement (kg.apc.charting.elements.GraphPanelChartExactElement)6 AbstractGraphPanelChartElement (kg.apc.charting.AbstractGraphPanelChartElement)2 Entry (java.util.Map.Entry)1 GraphRowExactValues (kg.apc.charting.rows.GraphRowExactValues)1