touchstudy-core 0.1.71 → 0.1.73

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11569,6 +11569,7 @@ var DEFAULT_LINE_CHART_OPTIONS = {
11569
11569
  show: true,
11570
11570
  fontSize: "12px",
11571
11571
  fontWeight: 600,
11572
+ height: 64,
11572
11573
  markers: {
11573
11574
  width: 16,
11574
11575
  height: 1
@@ -11836,11 +11837,17 @@ var useExamResult = function useExamResult(searchParam, history, examSessionId,
11836
11837
  }
11837
11838
  }),
11838
11839
  xaxis: _extends({}, DEFAULT_LINE_CHART_OPTIONS.xaxis, {
11839
- categories: ["."].concat(Array.from({
11840
+ categories: [""].concat(Array.from({
11840
11841
  length: questionLength
11841
11842
  }, function (_, i) {
11842
11843
  return ORDER_NUMBERS[i + 1] ? t(ORDER_NUMBERS[i + 1]) : toNumberOrder(i + 1);
11843
- }), ["."])
11844
+ }), [""]),
11845
+ tooltip: {
11846
+ formatter: function formatter(val) {
11847
+ if (val > 1) return t(ORDER_NUMBERS[val - 1]);
11848
+ return null;
11849
+ }
11850
+ }
11844
11851
  }),
11845
11852
  yaxis: _extends({}, DEFAULT_LINE_CHART_OPTIONS.yaxis, {
11846
11853
  tickAmount: questions.length + 1,
@@ -11916,11 +11923,17 @@ var useExamResult = function useExamResult(searchParam, history, examSessionId,
11916
11923
  }),
11917
11924
  colors: ['#3DC674', '#C3099A'],
11918
11925
  xaxis: _extends({}, DEFAULT_LINE_CHART_OPTIONS.xaxis, {
11919
- categories: ["."].concat(Array.from({
11926
+ categories: [""].concat(Array.from({
11920
11927
  length: questionLength
11921
11928
  }, function (_, i) {
11922
11929
  return ORDER_NUMBERS[i + 1] ? t(ORDER_NUMBERS[i + 1]) : toNumberOrder(i + 1);
11923
- }), ["."])
11930
+ }), [""]),
11931
+ tooltip: {
11932
+ formatter: function formatter(val) {
11933
+ if (val > 1) return t(ORDER_NUMBERS[val - 1]);
11934
+ return null;
11935
+ }
11936
+ }
11924
11937
  }),
11925
11938
  yaxis: _extends({}, DEFAULT_LINE_CHART_OPTIONS.yaxis, {
11926
11939
  tickAmount: questionLength + 1,
@@ -13710,6 +13723,13 @@ function MyAnswer(_ref) {
13710
13723
  handleSelectQuestionOrder(id);
13711
13724
  toggleCreateQuestion();
13712
13725
  };
13726
+ var formatTimeDiff = function formatTimeDiff(my, top) {
13727
+ var diff = Math.round(my - top);
13728
+ var prefix = "";
13729
+ if (diff < 0) prefix = "-";
13730
+ if (diff > 0) prefix = "+";
13731
+ return "" + prefix + formatTimeSecond(Math.abs(diff), t);
13732
+ };
13713
13733
  var renderQuestions = function renderQuestions(questions) {
13714
13734
  return questions.map(function (question, index) {
13715
13735
  return React__default.createElement("div", {
@@ -13772,7 +13792,7 @@ function MyAnswer(_ref) {
13772
13792
  margin: 0
13773
13793
  },
13774
13794
  className: styles$4["answer-response"] + " " + styles$4["answer-response-" + question.answerResponseSignal]
13775
- }, formatTimeSecond(Math.round(question.topDuration - question.duration), t)) : React__default.createElement("p", {
13795
+ }, formatTimeDiff(question.duration, question.topDuration)) : React__default.createElement("p", {
13776
13796
  style: {
13777
13797
  margin: 0,
13778
13798
  textAlign: "center"