code: function (d, chart, series) {
              var returnOpacity = 0;
              if (series.c !== null && series.c !== undefined) {
                  returnOpacity = d.opacity;
              } else {
                  returnOpacity = chart.getColor(d.aggField.slice(-1)[0]).opacity;
              }
              return returnOpacity;
          }
docs: Calculate the opacity for series