Pre loader

Android SciChart - Legend text size

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums


I have issue with legend on high resolutions screens. Checkboxes and text is very small and hard to read. I couldn’t find any solution to change text size or provide my own template with text size for legend in Android SciChart.

I want to change legend text size depends on screen like it is in Android by declaring size in dimens.xml.

I do that for Axis labels but I don’t know how do the same for text in legend.

Does anyone know how to achieve this?

  • You must to post comments
Best Answer

Hi Marcin,

Have you tried to customize one of default themes and override default text size property provided by ThemeProvider? It should change text size for legend items and annotations which contain text.

Please take a look on example which shows how to create custom themes and you’ll need to add one line into theme style which overrides default text size value:

    <style name="SciChart_BerryBlue" parent="SciChart_BaseStyle">
          <!-- override default textsize -->
          <item name="defaultTextSize">20sp</item>

          <!-- the rest of the theme values... -->

Hope this will help you!

Best regards,

  • You must to post comments

It helped with text size of legend but checkboxes was still the same.

I resolved checkboxes issue by setting in app theme android:checkboxStyle with style where android:button is drawable resource.


<style name="checkBoxStyle" parent="@android:style/Widget.CompoundButton.CheckBox">
    <item name="android:button">@drawable/checkbox</item>
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
    <item name="android:checkboxStyle">@style/checkBoxStyle</item>


<selector xmlns:android="">
    <item android:state_checked="true" android:drawable="@drawable/ic_check_box_black_24dp" />
    <item android:state_checked="false" android:drawable="@drawable/ic_check_box_outline_blank_black_24dp" />

Thank You for Your help.

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.