(function () {
    var actions = shmi.pkg("visuals.session.userActions"); //get reference to userActions object

    /**
     * UI-Action '_initData' implementation
     *
     * @params {any[]} parameters  configured ui-action parameters
     * ---- Initial parameters, needs to be updated manually when changed ----
     * @param {string} parameters[0]  sID
     *
     */
    actions["_initData"] = function (parameters) {
        const im = shmi.requires("visuals.session.ItemManager")
        const sX = "sX"
        const sY = "sY"
        let sAction = parameters[0]
        if (sAction === "2items") {
            im.writeValue(sX, '["aa","bb"]');
            im.writeValue(sY, '[2,5]');
        } else if (sAction === "4items") {
            im.writeValue(sX, '["aa","bb","cc","dd"]');
            im.writeValue(sY, '[3,2,7,5]');
        } else if (sAction === "8items") {
            im.writeValue(sX, '["aa","bb","cc","dd", "EE", "FF", "GG", "HH"]');
            im.writeValue(sY, '[4,2,5, 3, 1, 8, 4]');
        } else if (sAction === "10items") {
            im.writeValue(sX, '["aa","bb","cc","dd", "EE", "FF", "GG", "HH", "iii", "jjj"]');
            im.writeValue(sY, '[0.9, 2, 15, 3, 21, 20, 4, 0.4, 5]');
        }
    };
}());