diff options
author | Huy Bui (Kevin) <2992996+huybuidev@users.noreply.github.com> | 2020-07-11 01:07:41 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-11 01:07:41 +0800 |
commit | 42b1c8148883844cf80b70a3096e6ee67be01f61 (patch) | |
tree | 81c4d51eac73eea324664b88120d1e634ffe3073 /xmlChart.go | |
parent | 49257c5918f3aa9f2730021a7e6a24b4835646fd (diff) |
Resolve #661 Add Logarithmic scale option support on Y axis (#662)
* Resolve #661 Add Logarithmic scale option support on Y axis
Example usage:
Add the following option into the format string when using AddChart:
"y_axis":{"scaling":{"logbase":"10"}}
* Change type of LogBase from attrValString to attrVarFloat
* Add test case for testing Logarithmic Option in Y axis of charts
* Move field `LogBase` in the format string up one level (remove `Scaling`) as suggested the owner
Test cases are updated accordingly.
Diffstat (limited to 'xmlChart.go')
-rw-r--r-- | xmlChart.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/xmlChart.go b/xmlChart.go index 6f800d7..fae5426 100644 --- a/xmlChart.go +++ b/xmlChart.go @@ -380,6 +380,7 @@ type cChartLines struct { // cScaling directly maps the scaling element. This element contains // additional axis settings. type cScaling struct { + LogBase *attrValFloat `xml:"logBase"` Orientation *attrValString `xml:"orientation"` Max *attrValFloat `xml:"max"` Min *attrValFloat `xml:"min"` @@ -544,6 +545,7 @@ type formatChartAxis struct { Italic bool `json:"italic"` Underline bool `json:"underline"` } `json:"num_font"` + LogBase float64 `json:"logbase"` NameLayout formatLayout `json:"name_layout"` } |