Skip to content

Commit

Permalink
Feature/date ax (#4676)
Browse files Browse the repository at this point in the history
* [all] DateAx labels refactoring

* [all] Date ax basic functionality implemented

* [all] Last day bug fixed

* [se] Fix style

* [all] DateAx skip label functionality improved

* [all] Console logs removed

* [all] function getLabelsForAxis, added check for cat and date axes

* [all] Date ax logic changed

---------

Co-authored-by: Igor Zotov <Igor.Zotov@onlyoffice.com>
  • Loading branch information
ansaraidarbek and GoshaZotov committed Jun 26, 2024
1 parent 3007cd0 commit 8b5a4b3
Show file tree
Hide file tree
Showing 2 changed files with 273 additions and 105 deletions.
36 changes: 18 additions & 18 deletions common/Drawings/Format/ChartFormat.js
Original file line number Diff line number Diff line change
Expand Up @@ -7669,6 +7669,24 @@
CAxisBase.prototype.onUpdate = function() {
this.onChartInternalUpdate();
};
CAxisBase.prototype.getFormatCode = function() {
let oNumFmt = this.numFmt;
let sFormatCode = null;

if(oNumFmt) {
if(oNumFmt.sourceLinked) {
return this.getSourceFormatCode ? this.getSourceFormatCode() : "General";
}
sFormatCode = oNumFmt.formatCode;
if(typeof sFormatCode === "string" && sFormatCode.length > 0) {
return sFormatCode;
}
return "General";
}
else {
return this.getSourceFormatCode ? this.getSourceFormatCode() : "General";
}
};
CAxisBase.prototype.Refresh_RecalcData = function() {
this.onUpdate();
};
Expand Down Expand Up @@ -8972,24 +8990,6 @@
}
}
};
CValAx.prototype.getFormatCode = function() {
let oNumFmt = this.numFmt;
let sFormatCode = null;

if(oNumFmt) {
if(oNumFmt.sourceLinked) {
return this.getSourceFormatCode();
}
sFormatCode = oNumFmt.formatCode;
if(typeof sFormatCode === "string" && sFormatCode.length > 0) {
return sFormatCode;
}
return "General";
}
else {
return this.getSourceFormatCode();
}
};
CValAx.prototype.getSourceFormatCode = function() {
var oPlotArea = this.getPlotArea();
var sDefault = "General";
Expand Down
Loading

0 comments on commit 8b5a4b3

Please sign in to comment.