@@ -45,20 +45,17 @@ InteractivePlot::InteractivePlot() : backgroundColour (Colours::darkgrey),
4545 addAndMakeVisible (drawComponent.get ());
4646
4747 titleLabel = std::make_unique<Label> (" Title Label" , " Title" );
48- titleLabel->setFont (FontOptions (" Fira Code" , " Bold" , 15 .0f ));
49- titleLabel->setColour (Label::textColourId, axisColour);
48+ titleLabel->setFont (FontOptions (" Inter" , " Bold" , 15 .0f ));
5049 titleLabel->setJustificationType (Justification::centred);
5150 addAndMakeVisible (titleLabel.get ());
5251
5352 xLabel = std::make_unique<Label> (" X-Axis Label" , " X Label" );
54- xLabel->setFont (FontOptions (" Fira Code" , " Regular" , 15 .0f ));
55- xLabel->setColour (Label::textColourId, axisColour);
53+ xLabel->setFont (FontOptions (" Inter" , " Regular" , 15 .0f ));
5654 xLabel->setJustificationType (Justification::centred);
5755 addAndMakeVisible (xLabel.get ());
5856
5957 yLabel = std::make_unique<Label> (" Y-Axis Label" , " Y Label" );
60- yLabel->setFont (FontOptions (" Fira Code" , " Regular" , 15 .0f ));
61- yLabel->setColour (Label::textColourId, axisColour);
58+ yLabel->setFont (FontOptions (" Inter" , " Regular" , 15 .0f ));
6259 yLabel->setJustificationType (Justification::centred);
6360 addAndMakeVisible (yLabel.get ());
6461
@@ -97,6 +94,10 @@ void InteractivePlot::setAxisColour (Colour c)
9794{
9895 xAxis->setAxisColour (c);
9996 yAxis->setAxisColour (c);
97+
98+ xLabel->setColour (Label::textColourId, c);
99+ yLabel->setColour (Label::textColourId, c);
100+ titleLabel->setColour (Label::textColourId, c);
100101}
101102
102103void InteractivePlot::showGrid (bool state)
@@ -141,7 +142,7 @@ void InteractivePlot::resized()
141142
142143 titleLabel->setBounds (axesWidth + padding + 2 , 0 , w - axesWidth - padding * 2 , 20 );
143144 xLabel->setBounds (axesWidth + padding + 2 , getHeight () - 20 , w - axesWidth - padding * 2 , 20 );
144- yLabel->setBounds (0 , 0 , labelWidth, h);
145+ yLabel->setBounds (0 , 0 , labelWidth + 10 , h);
145146
146147 if (MIN (w, h) > 250 )
147148 {
@@ -222,7 +223,7 @@ Axis::Axis()
222223 max (1e4 ),
223224 colour (Colours::white)
224225{
225- font = FontOptions (15 .0f );
226+ font = FontOptions (" Inter " , " Regular " , 15 .0f );
226227}
227228
228229void Axis::setInverted (bool state)
@@ -320,7 +321,7 @@ void Axis::setTicks (std::vector<float> ticks_, std::vector<String> tickLabels_)
320321
321322void Axis::setFontHeight (int height)
322323{
323- font = font.withHeight (height);
324+ font = font.withHeight (height);
324325}
325326
326327void Axis::setAxisColour (Colour c)
0 commit comments