Pre loader

Tag: ControlTemplate

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

3 votes
19k views

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?

  • bstapylton asked 11 years ago
  • last active 9 years ago
1 vote
17k views

I have a case where there can be hundreds or even thousands of potential series on the surface.
When I use the LegendModifier, I only see the first 20 or so series.
What would it take to display a scrollbar so that the user can see all available series?
Thanks!

  • dwoerner asked 9 years ago
  • last active 9 years ago
1 vote
16k views

Hi!
Our Designer wants the LineGraphs to continue under the axis and the gridlines area not to have a border, to accomplish some kind of “open” look&feel.
To get this working, i think i need to template the scichartsurface and put the axis over the gridlinesarea.
I did not find any hints on templating the surface itself, only other parts.
In the example styles you only change colors and borders, but not the template itself.

Can you give me some advice? Am i even on the right track?

Thanks,
Claudius

1 vote
21k views

how can i apply styling for legend in legend modifier? i want to apply the following style

<Style x:Key="LegendStyle" TargetType="s:LegendModifier">
        <Setter Property="ContentTemplate">
            <Setter.Value>        
                <DataTemplate>
            <s:SciChartLegend  x:Name="legendControl"  Margin="2,2" Orientation="Horizontal"  Background="Transparent" BorderThickness="0" ScrollViewer.VerticalScrollBarVisibility="Auto"
                                Visibility="{Binding IsLegendVisible,Converter={StaticResource  BoolToVisibilityConverter}}" 
                                LegendData="{Binding LegendData,  ElementName=legendModifier,Mode=OneWay}">

                <s:SciChartLegend.Resources>
                    <SciChart:ColorToBrushConverter x:Key="ColorToBrushConverter"/>
                </s:SciChartLegend.Resources>
                <s:SciChartLegend.ItemTemplate>
                    <DataTemplate DataType="SciChart:XyzSeriesInfo">
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>
                            <Rectangle Grid.Column="0"
                                                VerticalAlignment="Center"
                                                Stretch="Fill"
                                                Width="10"

                                                StrokeThickness="10"
                                                Stroke="{Binding SeriesColor,
                                                Converter={StaticResource ColorToBrushConverter}}" />
                            <TextBlock Grid.Column="1" Foreground="Black" 
                                                Margin="2,0,15,0"
                                                HorizontalAlignment="Center"
                                                Text="{Binding SeriesName}" FontWeight="Normal"/>
                        </Grid>
                    </DataTemplate>
                </s:SciChartLegend.ItemTemplate>
            </s:SciChartLegend>
        </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>
  • Raghupathy asked 9 years ago
  • last active 9 years ago
1 vote
0 answers
15k views

Hi,

I have graph with Verctically Stacked Axes. Each of series have different scale. This means that Grid that holds yAxis ticks and labels has different width for each series.

As Axis Container is StackPanel it leads to problem, how to align AxisTitles ?

What I Would like is to set AxisContainer to Grid with two columns.
The first column for AxisTitle, second column for labels and ticks, with shared size group.
Is it possible?

UPDATE I have added a picture. Fig. 1. shows current state, Fig. 2. shows what i would like to achieve.

Thanks
Jan

  • Jan Kaiser asked 9 years ago
  • last active 9 years ago
1 vote
13k views

How can i wrap legend? if legend width is out of window.

  • Raghupathy asked 9 years ago
  • last active 9 years ago
0 votes
16k views

On priority support tickets, a user just asked us how to show and hide the AxisTitle TextBlock without changing the AxisTitle.Text to string.Empty.

The solution uses attached properties and a small custom style, so we thought we’d post it below

1 vote
10k views

Hi,
I have a SciChartGroup with 2 SciChartSurfaces…
It seems the SciChartGroup is adding the surface Title on its own somewhere.
What do I have to do to not display the 2nd surfaces title in white in the top-left corner?
Thanks!

(I’d attach the project, but the buttons on the ask page aren’t attaching anything – in chrome anyway…)

Here is the codebehind:

using System;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Windows;
using System.Windows.Input;
using Abt.Controls.SciChart;
namespace nameOn2ndSurface
{
    public partial class MainWindow : Window
{
    public MainWindow()
    {
        InitializeComponent();
    }
}
public class datamodel : INotifyPropertyChanged
{
    #region PropertyChanged

    public event PropertyChangedEventHandler PropertyChanged;
    protected void OnPropertyChanged(PropertyChangedEventArgs e)
    {
        if (PropertyChanged != null)
            PropertyChanged(this, e);
    }
    protected void notifyPropertyChanged(string propertyName)
    {
        PropertyChangedEventArgs e = new PropertyChangedEventArgs(propertyName);
        OnPropertyChanged(e);
    }

    #endregion

    ObservableCollection<DataModelGraph> graphs;

    public datamodel()
    {
        graphs = new ObservableCollection<DataModelGraph>();
        graphs.Add(new DataModelGraph() { Title = "graph1" });
        graphs.Add(new DataModelGraph() { Title = "graph2" });
    }
    public ObservableCollection<DataModelGraph> Graphs
    {
        get
        {
            return graphs;
        }
    }
}
public class DataModelGraph : IChildPane, INotifyPropertyChanged
{
    #region PropertyChanged

    public event PropertyChangedEventHandler PropertyChanged;
    protected void OnPropertyChanged(PropertyChangedEventArgs e)
    {
        if (PropertyChanged != null)
            PropertyChanged(this, e);
    }
    protected void notifyPropertyChanged(string propertyName)
    {
        PropertyChangedEventArgs e = new PropertyChangedEventArgs(propertyName);
        OnPropertyChanged(e);
    }

    #endregion

    string title;
    public DataModelGraph()
    {
        title = "graph";
    }
    public string Title
    {
        get
        {
            return title;
        }
        set
        {
            if (title != value)
            {
                title = value;
                notifyPropertyChanged("Title");
            }
        }
    }

    public ICommand ClosePaneCommand { get; set; }
    public void ZoomExtents()
    {
    }
}

}

Here is the xaml:

<Window x:Class="nameOn2ndSurface.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:s="http://schemas.abtsoftware.co.uk/scichart" 
    xmlns:local="clr-namespace:nameOn2ndSurface"
    Title="MainWindow" Height="350" Width="525">
<Window.Resources>
    <local:datamodel x:Key="data" />
    <Style TargetType="s:SciChartSurface">
        <Setter Property="Foreground" Value="Red"/>
        <Setter Property="ChartTitle" Value="{Binding Title}"/>
    </Style>
</Window.Resources>
<Grid DataContext="{DynamicResource data}">
    <s:SciChartGroup x:Name="group"
                     ItemsSource="{Binding Graphs}"
                     >
        <s:SciChartGroup.ItemTemplate>
            <DataTemplate>
                <s:SciChartSurface />
            </DataTemplate>
        </s:SciChartGroup.ItemTemplate>
    </s:SciChartGroup>
</Grid>

  • dwoerner asked 9 years ago
  • last active 3 months ago
0 votes
13k views

FAQ: How to create a custom legend with TextFormatting for the FastHeatmapRenderableSeries? The provided legend in SciChart v3.4 does not allow text formatting.

0 votes
12k views

Hi,

I have a chart where the Axis Title is truncated because the title is too long. Is there a way to wrap or put an ellipsis in the Axis Title? The height of my chart should be fix, so I have to do something about the title instead.

Thanks,
Ira

0 votes
10k views

I’m trying to switch RolloverMarker template at runtime from code behind, with no luck.
I have ControlTemplate definitions in XAML.
I create FastLineRenderableSeries objects and assign RolloverTemplates to them dymanically in code behind.
I add the series into sciChartSurface.RenderableSeries.
All this works.

When user clicks a series, a selectionChanged eventHandler method tries to switch the RolloverMarkerTemplate of the selected series

ControlTemplate ylbl = (ControlTemplate)Application.Current.Resources["RolloverLabelTopTemplate"];
 flrseries.RolloverMarkerTemplate = ylbl;

The template object is created from Resources and assigned to the series, but the visible presentation is not changed.

Is there a better ( = working) way to do this or is it even possible ?

Showing 11 results

Try SciChart Today

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

Start TrialCase Studies