Commit d95e7273 authored by Jeremy Pallats's avatar Jeremy Pallats 💬
Browse files

Add max amount of time ticks.

- Thought occurs, allow user a drop down to select unit.
parent 5dbd427d
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1682,7 +1682,7 @@ async def test_cmd_vote_prep(f_bot, f_dusers, f_global_testbed, f_vote_testbed):
    msg = fake_msg_gears("!vote prep 1")

    await action_map(msg, f_bot).execute()
    f_bot.send_message.assert_called_with(msg.channel, "**User1**: voted 1 Prep.")
    f_bot.send_message.assert_called_with(msg.channel, "**User1**: voted 6 Prep.")


@pytest.mark.asyncio
+6 −2
Original line number Diff line number Diff line
@@ -93,6 +93,10 @@
                scales: {
                    x: {
                        type: 'time',
                        ticks: {
                            autoSkip: true,
                            maxTicksLimit: 30,
                        },
                        time: {
                            displayFormats: {
                                second: "mm:ss",
@@ -133,7 +137,7 @@
                    }
                }
            }
            suitableUnit(voteConfig, voteChartData);
            <!-- suitableUnit(voteConfig, voteChartData); -->

            return new Chart(ele, {
                type: 'line',
@@ -155,7 +159,7 @@
                }
            }

            suitableUnit(chart.options, chartData);
            <!-- suitableUnit(chart.options, chartData); -->
            chart.update();
        }