Pre loader

How to make customize legend outside SciChart surface

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

Hi All
By default legends are being draw on scichart surface. I want to draw them outside the scichart surface because as the number of render-able series increase legends hides them. Please give me suggestion how do i do it ?

Version
v2.2.0.2
  • You must to post comments
0
0

I am considering applying server-side licensing for my javerScript application.

In the document below, there is a phrase “Our server-side licensing component is written in C++.”
(https://support.scichart.com/index.php?/Knowledgebase/Article/View/17256/42/)

However, there is only asp.net sample code on the provided github.
(https://github.com/ABTSoftware/SciChart.JS.Examples/tree/master/Sandbox/demo-dotnet-server-licensing)

I wonder if there is a sample code implemented in C++ for server-side licensing.

Can you provide c++ sample code?
Also, are there any examples to run on Ubuntu?

  • You must to post comments
0
0

Hi Yura
I want to draw the legends whenever a new Renderable series is added on surface and it should be disappeared as soon as Renderable series removed from the surface. Legends need to be draw outside the surface so that i can see renderable series properly.

  • Yura Khariton
    Have you tried the approach which I suggested in my previous answer? I believe it should provide desired behavior or maybe I’m missing something?
  • You must to post comments
0
0

Hi there,

Well since v2.1 release it pretty simple to do:

  1. You declare SciChartLegend somewhere in layout where you want to place legend.

      <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.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>
    
  2. You create LegendModifier for chart and pass SciChartLegend instance.

       final SciChartLegend legend = (SciChartLegend) findViewById(R.id.legend);
    
       ModifierGroup modifierGroup = sciChartBuilder.newModifierGroup()
                .withLegendModifier(legend).build()
                .build();
    

That’s all.

Also we have a few examples in our demo application which shows how to do this.

Hope this will help you!

Best regards,
Yura

  • You must to post comments
Showing 3 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