Dual Y-axis in serial chart is not taking their corresponding y-axis values

I am using dual y-axis of serial chart.
for ex: I have 6 data measures:

  1. Breeder Seed Target Production
  2. Total Breeder Seed Target Production
  3. Certified Seed Target Production
  4. Total Certified Seed Target Production
  5. Foundation Seed Target Production
  6. Total Foundation Seed Target Production
    I am using the below code:
if (value.getDataMeasureName().getMeasure_name().contains("Breeder")) {
    if (b == 0) {
        ValueAxis valueAxis = new ValueAxis();
        valueAxis.setId(value + "_Id" + i);
        valueAxis.setAutoGridCount(false);
        valueAxis.setAxisAlpha(1.0);
        valueAxis.setGridCount(5);
        valueAxis.setPosition(Position.RIGHT);
        valueAxis.setTitle("Breeder Production in (Kgs)");
        valueAxisList.add(valueAxis);
        b++;
    }
} else if (value.getDataMeasureName().getMeasure_name().contains("Certified") ||       
    value.getDataMeasureName().getMeasure_name().contains("Foundation"))
         {

    if (p == 0) {
        ValueAxis valueAxis = new ValueAxis();
        valueAxis.setId(value + "_Id" + i);
        valueAxis.setAutoGridCount(false);
        valueAxis.setAxisAlpha(1.0);
        valueAxis.setGridCount(5);
        valueAxis.setTitle("Production in (Tons)");
        valueAxis.setPosition(Position.LEFT);
        valueAxisList.add(valueAxis);
        p++;
    }
}

The values of certified are showing breeder axis. Can anyone say me is this code issue or data problem.

Thanks!!

Hi,

Could you please send us a small project that demonstrates an issue? It’s hard to guess without particular data and full chart configuration.

Regards,
Gleb