Pre loader

Legend customization - Xamarin Android

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

0
0

How to position the legend in the botton of chart and make 2 column foreach tag?

Version
7.1
  • Yura Khariton
    Hi Benigno. Can you clarify your requirements because it isn’t not clear what you’re trying to achieve ( you said that you need to place legend at the bottom of chart but on image which you posted legend is placed on top )? Also can you explain what ‘make 2 column foreach tag’ means? Thanks in advance.
  • Benigno Ranilla
    Add a new image to how I want it to be displayed. Thank you
  • You must to post comments
0
0

Hi Benigno,

I’m afraid it isn’t possible to achieve desired look of the legend at this moment because our legend implementation is based on LinearLayout and it doesn’t support wrapping of its children.


Regarding the placement the legend outside chart ( like on picture where legend is below chart ) – it was very hard to achieve in v2.0 but we’ve added native support for this case in v2.1 ( it isn’t released yet but you can get it from our Maven repository where we publish nightly builds ).

In v2.1 you’ll need to declare SciChartLegend somewhere in your layout ( e.g. below the chart ):

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:orientation="vertical">

<com.scichart.charting.visuals.SciChartSurface
    android:id="@+id/chart"
    android:layout_width="match_parent"
    android:layout_height="match_parent"/>

<com.scichart.charting.visuals.legend.SciChartLegend
    android:id="@+id/legend"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="center"
    android:layout_margin="10dp"/>

</LinearLayout>

And then just need to pass that legend instance into LegendModifier via constructor:

 LegendModifier legendModifier = new LegendModifier(legend);

Best regards,
Yura

  • You must to post comments
0
0

Hi Yura, I add the image I want to get to with the caption below and the items one after the other.

Images
  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies