Commit 93758bdf authored by Sergey.Luzyanin's avatar Sergey.Luzyanin Committed by Alexander.Trofimov

Настройки осей.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@54898 954022d7-b5bf-4e40-9824-e11837661b57
parent 517fb5d5
This diff is collapsed.
......@@ -6810,6 +6810,30 @@ UNIT_MULTIPLIERS[BUILT_IN_UNIT_TEN_MILLIONS] = 1.0/10000000.0;
UNIT_MULTIPLIERS[BUILT_IN_UNIT_TEN_THOUSANDS] = 1.0/10000.0;
UNIT_MULTIPLIERS[BUILT_IN_UNIT_TRILLIONS] = 1.0/1000000000000.0;
var MENU_SETTINGS_MAP = [];
MENU_SETTINGS_MAP[c_oAscValAxUnits.BILLIONS] = BUILT_IN_UNIT_BILLIONS;
MENU_SETTINGS_MAP[c_oAscValAxUnits.HUNDRED_MILLIONS] = BUILT_IN_UNIT_HUNDRED_MILLIONS;
MENU_SETTINGS_MAP[c_oAscValAxUnits.HUNDREDS] = BUILT_IN_UNIT_HUNDREDS;
MENU_SETTINGS_MAP[c_oAscValAxUnits.HUNDRED_THOUSANDS] = BUILT_IN_UNIT_HUNDRED_THOUSANDS;
MENU_SETTINGS_MAP[c_oAscValAxUnits.MILLIONS] = BUILT_IN_UNIT_MILLIONS;
MENU_SETTINGS_MAP[c_oAscValAxUnits.TEN_MILLIONS] = BUILT_IN_UNIT_TEN_MILLIONS;
MENU_SETTINGS_MAP[c_oAscValAxUnits.TEN_THOUSANDS] = BUILT_IN_UNIT_TEN_THOUSANDS;
MENU_SETTINGS_MAP[c_oAscValAxUnits.TRILLIONS] = BUILT_IN_UNIT_TRILLIONS;
var MENU_SETTINGS_TICK_MARK = []
MENU_SETTINGS_TICK_MARK[c_oAscTickMark.TICK_MARK_CROSS] = TICK_MARK_CROSS;
MENU_SETTINGS_TICK_MARK[c_oAscTickMark.TICK_MARK_IN ] = TICK_MARK_IN ;
MENU_SETTINGS_TICK_MARK[c_oAscTickMark.TICK_MARK_NONE ] = TICK_MARK_NONE ;
MENU_SETTINGS_TICK_MARK[c_oAscTickMark.TICK_MARK_OUT ] = TICK_MARK_OUT ;
var MENU_SETTINGS_LABELS_POS = [];
MENU_SETTINGS_LABELS_POS[c_oAscTickLabelsPos.TICK_LABEL_POSITION_HIGH ] = TICK_LABEL_POSITION_HIGH ;
MENU_SETTINGS_LABELS_POS[c_oAscTickLabelsPos.TICK_LABEL_POSITION_LOW ] = TICK_LABEL_POSITION_LOW ;
MENU_SETTINGS_LABELS_POS[c_oAscTickLabelsPos.TICK_LABEL_POSITION_NEXT_TO] = TICK_LABEL_POSITION_NEXT_TO;
MENU_SETTINGS_LABELS_POS[c_oAscTickLabelsPos.TICK_LABEL_POSITION_NONE ] = TICK_LABEL_POSITION_NONE ;
function CDispUnits()
{
this.builtInUnit = null;
......
......@@ -588,23 +588,31 @@
prot["getCrossesRule"] = prot.getCrossesRule ;
prot["getCrosses"] = prot.getCrosses ;
window["asc_ValAxisSettings"] = asc_ValAxisSettings;
function asc_CatAxisSettings()
{
this.intervalBetweenTick = null;
this.intervalBetweenLabelsRule = null;
this.intervalBetweenLabels = null;
this.invertCatOrder = null;
this.labelsAxisDistance = null;
this.axisType = null;
this.majorTickMark = null;
this.minorTickMark = null;
this.tickLabelsPos = null;
this.crossesRule = null;
this.crosses = null;
this.labelsPosition = null;
}
asc_CatAxisSettings.prototype =
{
putIntervalBetweenTick: function(v)
{
this.intervalBetweenTick = v;
},
putIntervalBetweenLabelsRule: function(v)
{
this.intervalBetweenLabelsRule = v;
......@@ -642,6 +650,21 @@
this.crosses = v;
},
putAxisType: function(v)
{
this.axisType = v;
},
putLabelsPosition: function(v)
{
this.labelsPosition = v;
},
getIntervalBetweenTick: function(v)
{
return this.intervalBetweenTick;
},
getIntervalBetweenLabelsRule: function()
{
return this.intervalBetweenLabelsRule ;
......@@ -677,10 +700,21 @@
getCrosses: function()
{
return this.crosses;
},
getAxisType: function()
{
return this.axisType;
},
getLabelsPosition: function()
{
return this.labelsPosition;
}
};
prot = asc_CatAxisSettings.prototype;
prot["putIntervalBetweenTick"] = prot.putIntervalBetweenTick;
prot["putIntervalBetweenLabelsRule"] = prot.putIntervalBetweenLabelsRule;
prot["putIntervalBetweenLabels"] = prot.putIntervalBetweenLabels ;
prot["putInvertCatOrder"] = prot.putInvertCatOrder ;
......@@ -690,9 +724,11 @@
prot["putTickLabelsPos"] = prot.putTickLabelsPos;
prot["putCrossesRule"] = prot.putCrossesRule;
prot["putCrosses"] = prot.putCrosses;
prot["putAxisType"] = prot.putAxisType;
prot["putLabelsPosition"] = prot.putLabelsPosition;
prot["getIntervalBetweenTick"] = prot.getIntervalBetweenTick;
prot["getIntervalBetweenLabelsRule"] = prot.getIntervalBetweenLabelsRule;
prot["getIntervalBetweenLabels"] = prot.getIntervalBetweenLabels ;
prot["getInvertCatOrder"] = prot.getInvertCatOrder ;
......@@ -702,9 +738,11 @@
prot["getTickLabelsPos"] = prot.getTickLabelsPos ;
prot["getCrossesRule"] = prot.getCrossesRule ;
prot["getCrosses"] = prot.getCrosses ;
prot["getAxisType"] = prot.getAxisType ;
prot["getLabelsPosition"] = prot.getLabelsPosition;
window["asc_CatAxisSettings"] = asc_CatAxisSettings;
}
)(window);
......
......@@ -245,4 +245,10 @@ var c_oAscBetweenLabelsRule =
{
auto: 0,
manual: 1
};
var c_oAscLabelsPosition =
{
byDivisions: 0,
betweenDivisions: 1
};
\ No newline at end of file
......@@ -2491,7 +2491,7 @@ Format
<div style="width: inherit; height: 1px; background: rgb(127,157,185)"></div>
<label>Crosses</label>
<br>
<label>auto</label><input type="radio" name="crosses" value="auto" checked="checked" id="crossesAutoValAxInput"><br>
<label>auto</label><input type="radio" name="crosses" value="auto" checked="checked" id="crossesAutoValAxInput" ><br>
<label>value</label><input type="radio" name="crosses" value="value" id="crossesValAxValInput"><input type="text" id="crossesValInput" disabled="disabled"><br>
<label>max value</label><input type="radio" name="crosses" value="maxValue" id="crossesMaxAxValInput">
<br>
......@@ -2508,7 +2508,7 @@ Format
<br>
<label>interval between labels:</label>
<br>
<input type="radio" name="intervalBetweenLabels" value="auto" class="intervalBetweenLabelsCatAxInput" checked="checked"><label>auto</label>
<input type="radio" name="intervalBetweenLabels" value="auto" class="intervalBetweenLabelsCatAxInput" checked="checked" id="autoIntervalBetweenLabelsInputCat"><label>auto</label>
<br>
<input type="radio" name="intervalBetweenLabels" value="manual" class="intervalBetweenLabelsCatAxInput"><label>manual</label>
<input type="text" id="intervalBetweenLabelsInputCatAxManual" disabled="disabled">
......@@ -2519,9 +2519,9 @@ Format
<br>
<label>Axis Type:</label>
<br>
<input type="radio" name="horAxisTypeInput" value="auto" checked="checked"><label>auto</label>
<input type="radio" name="horAxisTypeInput" value="text"><label>text</label>
<input type="radio" name="horAxisTypeInput" value="date"><label>date</label>
<input type="radio" class = "catAxisTypeInputAuto" name="horAxisTypeInput" value="auto" checked="checked"><label>auto</label>
<input type="radio" class = "catAxisTypeInputText" name="horAxisTypeInput" value="text"><label>text</label>
<input type="radio" class = "catAxisTypeInputDate" name="horAxisTypeInput" value="date"><label>date</label>
<br>
<div style="width: inherit; height: 1px; background: rgb(127,157,185)"></div>
<label>major tick mark</label>
......@@ -2551,14 +2551,14 @@ Format
<div style="width: inherit; height: 1px; background: rgb(127,157,185)"></div>
<label>Crosses</label>
<br>
<label>auto</label><input type="radio" name="crosses" value="auto" checked="checked" id="crossesAutoCatAxInput"><br>
<label>value</label><input type="radio" name="crosses" value="value" id="crossesCatAxValInput"><input type="text" id="crossesCatInput" disabled="disabled"><br>
<label>max value</label><input type="radio" name="crosses" value="maxValue" id="crossesMaxAxCatInput">
<label>auto</label><input type="radio" name="crossesCat" value="auto" checked="checked" id="crossesAutoCatAxInput"><br>
<label>value</label><input type="radio" name="crossesCat" value="value" id="crossesCatAxValInput"><input type="text" id="crossesCatInput" disabled="disabled"><br>
<label>max value</label><input type="radio" name="crossesCat" value="maxValue" id="crossesMaxAxCatInput">
<br>
<label>Axis Position</label><br>
<label>by divisions:</label><input type="checkbox" id="checkBoxByDivisionsInput">
<label>by divisions:</label><input type="radio" id="checkBoxByDivisionsInput" checked="checked">
<br>
<label>between divisions:</label><input type="checkbox" id="checkBoxBetweenDivisionsInput">
<label>between divisions:</label><input type="radio" id="checkBoxBetweenDivisionsInput">
<div style="width: inherit; height: 1px; background: rgb(127,157,185)"></div>
<button id="valApplyCatAxisProps">
Apply Props
......
......@@ -2741,9 +2741,6 @@
$("#chartPropsMenuDiv").draggable();
api.asc_registerCallback("asc_onSelectChart", function (chartSpace) {
$("#chartPropsMenuDiv").css("display", "");
$("#styleIndexInput").attr( "value", chartSpace.style + "");
......@@ -3096,5 +3093,59 @@
}
);
$("#valApplyCatAxisProps").click(
function()
{
var settings = new asc_ChartSettings();
var axis_settings = new asc_CatAxisSettings();
settings.putHorAxisProps(axis_settings);
axis_settings.putIntervalBetweenLabels(parseInt($("intervalBetweenTickInput").attr("value")));
if($("#autoIntervalBetweenLabelsInputCat").attr("checked"))
{
axis_settings.putIntervalBetweenLabelsRule(c_oAscBetweenLabelsRule.auto);
}
else
{
axis_settings.putIntervalBetweenLabelsRule(c_oAscBetweenLabelsRule.manual);
axis_settings.putIntervalBetweenLabels(parseInt($("#intervalBetweenLabelsInputCatAxManual").attr("value")));
}
if($("#invertCatOrderCheckBox").attr("checked"))
axis_settings.putInvertCatOrder(true);
else
axis_settings.putInvertCatOrder(false);
axis_settings.putLabelsAxisDistance(parseInt($("#labelsAxisInputDistanceInput").attr("value")));
if($("#catAxisTypeInputAuto").attr("checked"))
axis_settings.putAxisType(c_oAscHorAxisType.auto);
else if($("#catAxisTypeInputText").attr("checked"))
axis_settings.putAxisType(c_oAscHorAxisType.text);
else
axis_settings.putAxisType(c_oAscHorAxisType.date);
axis_settings.putMajorTickMark(c_oAscTickMark[$("#majorTickMarkSelectCatAx").attr("value")]);
axis_settings.putMinorTickMark(c_oAscTickMark[$("#minorTickMarkSelectCatAx").attr("value")]);
axis_settings.putTickLabelsPos(c_oAscTickLabelsPos[$("#tickLabelsSelectCatAx").attr("value")]);
if($("#crossesAutoCatAxInput").attr("checked"))
{
axis_settings.putCrossesRule(c_oAscCrossesRule.auto);
}
else if($("#crossesCatAxValInput").attr("checked"))
{
axis_settings.putCrossesRule(c_oAscCrossesRule.value);
axis_settings.putCrosses($("#crossesCatInput").attr("value"));
}
else
{
axis_settings.putCrossesRule(c_oAscCrossesRule.maxValue);
}
if($("#checkBoxByDivisionsInput").attr("checked"))
axis_settings.putLabelsPosition(c_oAscLabelsPosition.byDivisions);
else
axis_settings.putLabelsPosition(c_oAscLabelsPosition.betweenDivisions);
api.asc_editChartDrawingObject(settings);
}
);
});
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment