matrix conf fixed
This commit is contained in:
@@ -271,22 +271,22 @@
|
|||||||
"short_name": "2",
|
"short_name": "2",
|
||||||
"name": "Solidarity",
|
"name": "Solidarity",
|
||||||
"points_col": "G",
|
"points_col": "G",
|
||||||
"percentage_reached_col": "I",
|
"percentage_reached_col": "J",
|
||||||
"max_points_col": "J"
|
"max_points_col": "I"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"short_name": "3",
|
"short_name": "3",
|
||||||
"name": "Environment sustainability",
|
"name": "Environment sustainability",
|
||||||
"points_col": "K",
|
"points_col": "K",
|
||||||
"percentage_reached_col": "M",
|
"percentage_reached_col": "N",
|
||||||
"max_points_col": "N"
|
"max_points_col": "M"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"short_name": "4",
|
"short_name": "4",
|
||||||
"name": "Transparency",
|
"name": "Transparency",
|
||||||
"points_col": "O",
|
"points_col": "O",
|
||||||
"percentage_reached_col": "Q",
|
"percentage_reached_col": "R",
|
||||||
"max_points_col": "R"
|
"max_points_col": "Q"
|
||||||
}
|
}
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -213,6 +213,7 @@ func XLSX(r io.Reader, conf *Conf) (*ecalc.Ecalc, error) {
|
|||||||
case "PercentageReached":
|
case "PercentageReached":
|
||||||
mTopic.PercentageReached = int(f * 100)
|
mTopic.PercentageReached = int(f * 100)
|
||||||
}
|
}
|
||||||
|
// fmt.Println(axis, field, f, cellValue)
|
||||||
}
|
}
|
||||||
readCell(val.PointsCol, "Points")
|
readCell(val.PointsCol, "Points")
|
||||||
readCell(val.MaxPointsCol, "MaxPoints")
|
readCell(val.MaxPointsCol, "MaxPoints")
|
||||||
|
|||||||
@@ -29,5 +29,14 @@ func TestXLSX(t *testing.T) {
|
|||||||
is.Equal(got.Matrix.Topics[4].Points, 27)
|
is.Equal(got.Matrix.Topics[4].Points, 27)
|
||||||
is.Equal(got.Matrix.Topics[4].MaxPoints, 33)
|
is.Equal(got.Matrix.Topics[4].MaxPoints, 33)
|
||||||
is.Equal(got.Matrix.Topics[4].PercentageReached, 80)
|
is.Equal(got.Matrix.Topics[4].PercentageReached, 80)
|
||||||
|
is.Equal(got.Matrix.Topics[5].Points, 2) // points B2
|
||||||
|
is.Equal(got.Matrix.Topics[5].MaxPoints, 22) // maxPoints B2
|
||||||
|
is.Equal(got.Matrix.Topics[5].PercentageReached, 10) // percent B2
|
||||||
|
is.Equal(got.Matrix.Topics[6].Points, 10) // points B3
|
||||||
|
is.Equal(got.Matrix.Topics[6].MaxPoints, 33) // maxPoints B3
|
||||||
|
is.Equal(got.Matrix.Topics[6].PercentageReached, 30) // percent B3
|
||||||
|
is.Equal(got.Matrix.Topics[7].Points, 2) // points B4
|
||||||
|
is.Equal(got.Matrix.Topics[7].MaxPoints, 22) // maxPoints B4
|
||||||
|
is.Equal(got.Matrix.Topics[7].PercentageReached, 10) // percent B4
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user