Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,9 @@ export class GraphStudent extends ComponentStudent {
*/
drawGraphHelper(resolve) {
this.turnOffXAxisDecimals();
this.turnOffYAxisDecimals();
if (!this.isAllowDecimalsForYAxis()) {
this.turnOffYAxisDecimals();
}
this.copyXAxisPlotBandsFromComponentContent();
this.setupXAxisLimitSpacerWidth();
let series = null;
Expand Down Expand Up @@ -655,6 +657,12 @@ export class GraphStudent extends ComponentStudent {
this.xAxis.allowDecimals = false;
}

private isAllowDecimalsForYAxis(): boolean {
return isSingleYAxis(this.yAxis)
? this.yAxis.allowDecimals
: this.yAxis.some((yAxis) => yAxis.allowDecimals);
}

turnOffYAxisDecimals() {
if (isSingleYAxis(this.yAxis)) {
this.yAxis.allowDecimals = false;
Expand Down
12 changes: 6 additions & 6 deletions src/messages.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -19189,39 +19189,39 @@ Category Name: <x id="PH_1" equiv-text="categoryName"/></source>
<source>The series you are trying to add a point to is currently hidden. Please show the series by clicking the series name in the legend and try adding the point again.</source>
<context-group purpose="location">
<context context-type="sourcefile">src/assets/wise5/components/graph/graph-student/graph-student.component.ts</context>
<context context-type="linenumber">853</context>
<context context-type="linenumber">861</context>
</context-group>
</trans-unit>
<trans-unit id="2852989551014711458" datatype="html">
<source>You can not edit this series. Please choose a series that can be edited.</source>
<context-group purpose="location">
<context context-type="sourcefile">src/assets/wise5/components/graph/graph-student/graph-student.component.ts</context>
<context context-type="linenumber">867</context>
<context context-type="linenumber">875</context>
</context-group>
</trans-unit>
<trans-unit id="7053114367342967943" datatype="html">
<source>Are you sure you want to reset the series?</source>
<context-group purpose="location">
<context context-type="sourcefile">src/assets/wise5/components/graph/graph-student/graph-student.component.ts</context>
<context context-type="linenumber">1100</context>
<context context-type="linenumber">1108</context>
</context-group>
</trans-unit>
<trans-unit id="7889560203726829643" datatype="html">
<source>Are you sure you want to reset the &quot;<x id="PH" equiv-text="seriesName"/>&quot; series?</source>
<context-group purpose="location">
<context context-type="sourcefile">src/assets/wise5/components/graph/graph-student/graph-student.component.ts</context>
<context context-type="linenumber">1102</context>
<context context-type="linenumber">1110</context>
</context-group>
</trans-unit>
<trans-unit id="6999515396807067782" datatype="html">
<source>Trial</source>
<context-group purpose="location">
<context context-type="sourcefile">src/assets/wise5/components/graph/graph-student/graph-student.component.ts</context>
<context context-type="linenumber">1519</context>
<context context-type="linenumber">1527</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/assets/wise5/components/graph/graph-student/graph-student.component.ts</context>
<context context-type="linenumber">2351</context>
<context context-type="linenumber">2359</context>
</context-group>
</trans-unit>
<trans-unit id="7500488806315952979" datatype="html">
Expand Down
Loading