Pre loader

Forums

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

1 vote
8k views

Hi,

I need create a columnChart with multiple Column value.

If I create a datapoint with 0 in Y value I have a flat red line

{
    XyDataSeries<DateTime, double> Serie = new XyDataSeries<DateTime, double>();
    foreach (var point in Ohlcvs)
        Serie.Append(point.THE_DATE, (point.O < point.C) ? point.V : 0);
    var ser = new StackedColumnRenderableSeries
    {
        DataSeries = Serie,
        StackedGroupId = "VolumeId",
        FillBrush = ColorCode.StockUp,
        SeriesColor = ColorCode.StockUp.Color,
        DataPointWidth = 0.8
    };
    ChartVolume.RenderableSeries.Add(ser);
}
{
    XyDataSeries<DateTime, double> Serie = new XyDataSeries<DateTime, double>();
    foreach (var point in Ohlcvs)
        Serie.Append(point.THE_DATE, (point.O > point.C) ? point.V : 0);
    var ser = new StackedColumnRenderableSeries
    {
        DataSeries = Serie,
        StackedGroupId = "VolumeId",
        FillBrush = ColorCode.StockDown,
        SeriesColor = ColorCode.StockDown.Color,
        DataPointWidth = 0.8
    };
    ChartVolume.RenderableSeries.Add(ser);
}

when StackedColumnRenderableSeries is used with different number of datapoint in the each serie I have this bug

    {
        XyDataSeries<DateTime, double> Serie = new XyDataSeries<DateTime, double>();
        foreach (var point in Ohlcvs.Where(o=>o.O<o.C))
            Serie.Append(point.THE_DATE, point.V );
        var ser = new StackedColumnRenderableSeries
        {
            DataSeries = Serie,
            StackedGroupId = "VolumeId",
            FillBrush = ColorCode.StockUp,
            SeriesColor = ColorCode.StockUp.Color,
            DataPointWidth = 0.8
        };
        ChartVolume.RenderableSeries.Add(ser);
    }
    {
        XyDataSeries<DateTime, double> Serie = new XyDataSeries<DateTime, double>();
        foreach (var point in Ohlcvs.Where(o => o.O > o.C))
            Serie.Append(point.THE_DATE, point.V);
        var ser = new StackedColumnRenderableSeries
        {
            DataSeries = Serie,
            StackedGroupId = "VolumeId",
            FillBrush = ColorCode.StockDown,
            SeriesColor = ColorCode.StockDown.Color,
            DataPointWidth = 0.8
        };
        ChartVolume.RenderableSeries.Add(ser);
    }

In the real case , there are 8 series .
They can beings presented on the same point X or not .

Thanks

  • Sylvain60 asked 9 years ago
  • last active 9 years ago
1 vote
14k views

I am stuck and do not seem to be able to make the legend become visible. I use a SciChartGroup and Datatemplate (MainChartView) as follows:

<UserControl x:Class="SciChartSample.Views.MainChartView"
         xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
         xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
         xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
         xmlns:s="http://schemas.abtsoftware.co.uk/scichart"
         xmlns:resources="clr-namespace:SciChartSample.Resources"
         xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
         xmlns:mvvm="clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.Extras"
         mc:Ignorable="d" 
         d:DesignHeight="400" d:DesignWidth="600"
         DataContext="{Binding MainChartViewModel, Source={StaticResource Locator}}">

<i:Interaction.Triggers>
    <i:EventTrigger EventName="SizeChanged">
        <mvvm:EventToCommand 
            Command="{Binding UserControlResizedCommand, Mode=OneWay}"
            EventArgsConverterParameter="{Binding ElementName=LayoutRoot}"
            PassEventArgsToCommand="True" />
    </i:EventTrigger>
</i:Interaction.Triggers>

<UserControl.Resources>

    <!-- This allows setting the Height of a pane from a viewmodel -->
    <Style x:Key="ChartPaneStyle" TargetType="s:SciChartGroupPane">
        <Setter Property="Height" Value="{Binding PaneViewModel.Height, Mode=TwoWay}"/>
    </Style>

    <!-- A number of converters which change parameters of charts based on the IsFirstChartPane property -->
    <resources:BoolToValueConverter x:Key="MinorsPerMajorConverter" TrueValue="4" FalseValue="2"/>
    <resources:BoolToValueConverter x:Key="MaxAutoTicksConverter" TrueValue="8" FalseValue="4"/>
    <resources:BoolToValueConverter x:Key="GrowByConverter" >
    <resources:BoolToValueConverter.TrueValue>
        <s:DoubleRange Min="0.05" Max="0.05"/>
    </resources:BoolToValueConverter.TrueValue>
    <resources:BoolToValueConverter.FalseValue>
        <s:DoubleRange Min="0.02" Max="0.02"/>
    </resources:BoolToValueConverter.FalseValue>
    </resources:BoolToValueConverter>
    <resources:IsModifierTypeConverter x:Key="IsModifierTypeConverter" />

</UserControl.Resources>

<Grid>

    <Grid.RowDefinitions>
        <RowDefinition Height="Auto" />
        <RowDefinition Height="*" />
        <RowDefinition Height="Auto" />
    </Grid.RowDefinitions>

    <!-- Databinds a SciChartGroup to a list of ChartPaneViewModels -->
    <!-- Child chart panes are generated using the ItemTemplate below -->
    <s:SciChartGroup Grid.Row="1" 
                     ItemsSource="{Binding ChartPaneViewModels}"
                     s:ThemeManager.Theme="{Binding ElementName=ThemeCombo, Path=SelectedItem}"
                     ItemContainerStyle="{StaticResource ChartPaneStyle}">

        <s:SciChartGroup.ItemTemplate>

            <DataTemplate>

                <s:SciStockChart Padding="0" 
                                 BorderThickness="0,0,1,1"
                                 ChartTitle="{Binding Title}"  
                                 IsXAxisVisible="{Binding IsFirstChartPane}"     
                                 IsPanEnabled="{Binding ParentViewModel.IsPanEnabled}"
                                 IsRubberBandZoomEnabled="{Binding ParentViewModel.IsZoomEnabled}"  
                                 VerticalChartGroupId="{Binding ParentViewModel.VerticalChartGroupId}"                                     
                                 SeriesSource="{Binding ChartSeriesViewModels}">

                    <s:SciStockChart.XAxisStyle>
                        <Style TargetType="s:CategoryDateTimeAxis">
                            <Setter Property="LabelProvider" Value="{Binding XAxisFormatting}"/>
                            <Setter Property="DrawMajorBands" Value="False"/>
                            <Setter Property="DrawMinorGridLines" Value="False"/>
                            <Setter Property="VisibleRange" Value="{Binding ParentViewModel.XVisibleRange, Mode=TwoWay}"/>
                            <Setter Property="GrowBy" Value="0, 0.02"/>

                        </Style>
                    </s:SciStockChart.XAxisStyle>

                    <s:SciStockChart.YAxisStyle>
                        <Style TargetType="s:NumericAxis">
                            <Setter Property="TextFormatting" Value="{Binding YAxisTextFormatting}"/>
                            <Setter Property="AutoRange" Value="Always"/>
                            <Setter Property="MinorsPerMajor" Value="{Binding IsFirstChartPane, Converter={StaticResource MinorsPerMajorConverter}}"/>
                            <Setter Property="MaxAutoTicks" Value="{Binding IsFirstChartPane, Converter={StaticResource MaxAutoTicksConverter}}"/>
                            <Setter Property="GrowBy" Value="{Binding IsFirstChartPane, Converter={StaticResource GrowByConverter}}"/>
                        </Style>
                    </s:SciStockChart.YAxisStyle>

                </s:SciStockChart>

            </DataTemplate>
        </s:SciChartGroup.ItemTemplate>
    </s:SciChartGroup>

    <StackPanel Grid.Row="0"
                Margin="2,4"
                Orientation="Horizontal">

        <ToggleButton Margin="2"
                      Command="{Binding PanModeCommand}"
                      s:ToggleButtonExtensions.GroupName="Modifiers"
                      IsChecked="True">
            <StackPanel Orientation="Horizontal" Width="47">

                <TextBlock Margin="3" Text="Pan" />
            </StackPanel>
        </ToggleButton>

        <ToggleButton Margin="2"
                      Command="{Binding ZoomModeCommand}"
                      s:ToggleButtonExtensions.GroupName="Modifiers">
            <StackPanel Orientation="Horizontal">

                <TextBlock Margin="3" Text="Zoom" />
            </StackPanel>
        </ToggleButton>

        <Button Margin="2" Command="{Binding ElementName=priceChart, Path=ZoomExtentsCommand}">
            <StackPanel Orientation="Horizontal">

                <TextBlock Margin="3" Text="Zoom Extents" />
            </StackPanel>
        </Button>

    </StackPanel>

    <Button Margin="259,4,261,6">
        <Button Content="LoadData" Height="30" Width="80" Command="{Binding LoadDataCommand}" CommandParameter="UserC"/>
    </Button>


</Grid>

My ChartView looks as follows:

<UserControl x:Class="SciChartSample.Views.ChartView"
         xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
         xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
         xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
         xmlns:visuals="clr-namespace:Abt.Controls.SciChart.Visuals;assembly=Abt.Controls.SciChart.Wpf"
         xmlns:sciChart3="clr-namespace:Abt.Controls.SciChart;assembly=Abt.Controls.SciChart.Wpf"
         xmlns:renderableSeries3="clr-namespace:Abt.Controls.SciChart.Visuals.RenderableSeries;assembly=Abt.Controls.SciChart.Wpf"
         xmlns:pointMarkers="clr-namespace:Abt.Controls.SciChart.Visuals.PointMarkers;assembly=Abt.Controls.SciChart.Wpf"
         xmlns:axes3="clr-namespace:Abt.Controls.SciChart.Visuals.Axes;assembly=Abt.Controls.SciChart.Wpf"
         xmlns:chartModifiers3="clr-namespace:Abt.Controls.SciChart.ChartModifiers;assembly=Abt.Controls.SciChart.Wpf"

         d:DesignHeight="577"
         d:DesignWidth="735"
         mc:Ignorable="d"
         DataContext="{Binding ChartViewModel, Source={StaticResource Locator}}">

<Grid>
    <Grid.ColumnDefinitions>
        <ColumnDefinition Width="368*"/>
        <ColumnDefinition Width="367*"/>
    </Grid.ColumnDefinitions>

    <Grid.RowDefinitions>
        <RowDefinition Height="32"></RowDefinition>
        <RowDefinition Height="*"></RowDefinition>
        <RowDefinition Height="*"></RowDefinition>
    </Grid.RowDefinitions>

    <!-- Define Toolbar -->
    <StackPanel Grid.Row="0" Orientation="Horizontal" Grid.ColumnSpan="2">
        <ToggleButton Content="Zoom" Margin="3"
                      IsChecked="{Binding ZoomEnabled, Mode=TwoWay}"/>
        <ToggleButton Content="Pan" Margin="3"
                      IsChecked="{Binding PanEnabled, Mode=TwoWay}"/>
        <ToggleButton Content="MouseWheel" Margin="3"
                      IsChecked="{Binding MouseWheelEnabled, Mode=TwoWay}"/>
        <ToggleButton Content="Rollover" Margin="3"
                      IsChecked="{Binding RolloverEnabled, Mode=TwoWay}"/>
        <ToggleButton Content="Cursor" Margin="3"
                      IsChecked="{Binding CursorEnabled, Mode=TwoWay}" />
    </StackPanel>

    <visuals:SciChartSurface x:Name="MainChart" Grid.Row="1" sciChart3:ThemeManager.Theme="Chrome" Padding="30" Grid.RowSpan="2" Grid.ColumnSpan="2">

        <visuals:SciChartSurface.RenderableSeries>

            <renderableSeries3:FastLineRenderableSeries SeriesColor="DarkBlue" DataSeries="{Binding ChartData}">
                <renderableSeries3:FastLineRenderableSeries.PointMarker>
                    <pointMarkers:EllipsePointMarker Width="7" Height="7" Stroke="DarkBlue" Fill="DarkBlue" StrokeThickness="1"/>
                </renderableSeries3:FastLineRenderableSeries.PointMarker>
            </renderableSeries3:FastLineRenderableSeries>

        </visuals:SciChartSurface.RenderableSeries>

        <visuals:SciChartSurface.XAxis>
            <axes3:DateTimeAxis
                SubDayTextFormatting="dd/MM/yyyy HH:mm:ss.fff"
                VisibleRange="{Binding ChartData.XValues, Mode=OneWay}"
                GrowBy="0.1,0.1">
            </axes3:DateTimeAxis>
        </visuals:SciChartSurface.XAxis>

        <visuals:SciChartSurface.YAxis>
            <axes3:NumericAxis 
                VisibleRange="{Binding ChartData.YValues, Mode=OneWay}"
                GrowBy="0.1,0.1">
            </axes3:NumericAxis>
        </visuals:SciChartSurface.YAxis>

        <visuals:SciChartSurface.ChartModifier>
            <chartModifiers3:ModifierGroup>
                <chartModifiers3:RubberBandXyZoomModifier IsEnabled="{Binding ZoomEnabled, Mode=TwoWay}" IsXAxisOnly="True"></chartModifiers3:RubberBandXyZoomModifier>
                <chartModifiers3:ZoomPanModifier IsEnabled="{Binding PanEnabled, Mode=TwoWay}"></chartModifiers3:ZoomPanModifier>
                <chartModifiers3:MouseWheelZoomModifier IsEnabled="{Binding MouseWheelEnabled, Mode=TwoWay}"></chartModifiers3:MouseWheelZoomModifier>
                <chartModifiers3:RolloverModifier IsEnabled="{Binding RolloverEnabled, Mode=TwoWay}"></chartModifiers3:RolloverModifier>
                <chartModifiers3:CursorModifier IsEnabled="{Binding CursorEnabled, Mode=TwoWay}"  ShowTooltip="True" ShowTooltipOn="Always"  ></chartModifiers3:CursorModifier>
                <chartModifiers3:LegendModifier x:Name="legendSource" ShowLegend="True" Visibility="Visible" GetLegendDataFor="AllSeries"/>
            </chartModifiers3:ModifierGroup>
        </visuals:SciChartSurface.ChartModifier>

    </visuals:SciChartSurface>

    <visuals:SciChartLegend LegendData="{Binding LegendData, ElementName=legendSource, Mode=OneWay}"/>

</Grid>

Please note that I included a legendModifier in the ChartView and also defined a ChartLegend in same. But the legend is not visible at all. What am I doing wrong? Thanks

  • bbmat asked 9 years ago
  • last active 9 years ago
1 vote
12k views

Hi All,

It is possible click on the point of the chart, get position and draw some label for selected point?

Thanks,

Arthur

1 vote
14k views

I want to display a point as a decimar separator in numeric values. I have achieved this in chart axis and vertical slices tooltips, creating a custom NumericLabelProvider (see attached picture). How can I do the same with vertical slices xacis labels? (in the picture attached, note that every numeric value has a point as a decimar separator, but vertical slice label has a comma). I have defined LabelTextFormatting of the slice with “#.##E+0”, but it doesn’t work.

Thanks in advance

Regads, Juan

0 votes
8k views

I’ve seen lots of questions like that here but still can’t figure out how to work with UserControl in WPF and how can i dinamically arrange annotations on user events (lines, figures,text etc). Can you please provide links which may help to get started from scratch. Thank you!

0 votes
20k views

Hi

I’m having trouble making the RolloverModifier TooltipLabels stay inside the graphs canvas.

screenshot

As you can see on the left most graph the colored sqaures and some of the digits has fallen outside the graphs canvas.
Also what are the TooltipLabels rules for clustering together, and rules for which side of the RolloverMarker the labels should appear on?

Still having a problem here… After setting the ClipModifierSurface on the SciChartSurface to False the time axis no longer clips the TooltipLabels.
But the graph itself clips the TooltipLabels when the label gets to large.

How do I make the labels stay inside the graph? As there is a lot of free space to the right of the labels.

enter image description here

0 votes
11k views

Hi,

Is it possible to use Axis AutoRange so that the range stays the same while zooming, but I could still define min and max properties?

Thanks

0 votes
11k views

I am using a SciChartScrollbar to scroll the Y axis of a plot. I was previously using SciChart 3.4 and the control worked well. My XAML is as follows:

    <Grid Grid.Column="1">

        <Grid.RowDefinitions>
            <RowDefinition Height="{Binding ActualYAxesHeightValue, ElementName=PropertyProxy, Mode=OneWay, Converter={StaticResource DoubleToGridLengthConverter}}"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <helpers:TotalSizeOfAxes x:Name="PropertyProxy" Element="{Binding ElementName=FormationChart}" />

        <s:SciChartSurface x:Name="OverviewSurface" s:ThemeManager.Theme="BrightSpark" Grid.Row="1" Loaded="OnOverviewSurfaceLoaded">
            <s:SciChartSurface.RenderableSeries>
                <sciChartExtensions:StepLineRenderableSeries DataSeries="{Binding HResistivityChartData, Mode=TwoWay}">
                    <s:FastLineRenderableSeries.Style>
                        <Style TargetType="s:FastLineRenderableSeries">
                            <Setter Property="Stroke" Value="Blue" />
                            <Setter Property="StrokeThickness" Value="1" />
                        </Style>
                    </s:FastLineRenderableSeries.Style>
                </sciChartExtensions:StepLineRenderableSeries>
            </s:SciChartSurface.RenderableSeries>

            <s:SciChartSurface.XAxis>
                <s:NumericAxis AxisAlignment="Left" DrawMajorGridLines="False" DrawMinorGridLines="False"
                               Visibility="Collapsed" />
            </s:SciChartSurface.XAxis>

            <s:SciChartSurface.YAxis>
                <s:LogarithmicNumericAxis AxisAlignment="Top" VisibleRange="0.2,2000" FlipCoordinates="True"
                                          DrawMajorGridLines="False" DrawMinorGridLines="False"
                                          Visibility="Collapsed"/>
            </s:SciChartSurface.YAxis>
        </s:SciChartSurface>

        <s:SciChartScrollbar x:Name="DepthScrollbar" Grid.Row="1" Axis="{Binding ElementName=DepthAxis}" VerticalAlignment="Top"
                             Margin="{Binding ElementName=FormationChart, Path=Padding, Mode=OneWay}"
                             Loaded="OnScrollbarLoaded">
        </s:SciChartScrollbar>

    </Grid>        

I have attached a picture of the plot. The scrollbar is black instead of transparent, and the width does not fill the grid column. I checked the knowledge base article on using this control, but I don’t think the article was updated for 4.x.

1 vote
7k views

Hi,

Is it possible to invert a bar or impulse chart so that the bars grow down from the top of the chart pane?

Cheers
Felix

  • F W asked 9 years ago
  • last active 9 years ago
0 votes
10k views

Afternoon guys, I’ve got an overview defined as below:

    <Grid Name="MainWindowGrid" Margin="0,0,0,0" DataContext="{Binding Source={StaticResource ViewModel}}">

        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="25"/>
        </Grid.RowDefinitions>

        <Menu Height="23" VerticalAlignment="Top" Width="Auto" Grid.Row="0" IsMainMenu ="True">
 ...Stuff
        </Menu>

        <Grid Name="ChartsGrid" Grid.Row="1"/>
        <Grid/>

        <SciChart:SciChartOverview x:Name="overview" Grid.Row="2" SciChart:ThemeManager.Theme="ExpressionLight" Margin="1,0,1,1"/>
                                   
    </Grid>

I define all of my different surfaces within the ChartsGrid grid and then attempt to bind the first one to the overview below it. I can manage to get the two linked by doing

overview.ParentSurface = (ChartsGrid.Children[0] as BaseChart).Surface;

which gets me a functional (though not ideal) association. My issue for now comes in with simply trying to change the color of the overview fill. AreaBrush doesn’t seem to change anything, but the only other coloring option I’ve got is AreaColor and that has been documented as obsolete. Suggestions? Help? The only thing I can manage is, no matter the color input, I get a fill color of beige/flesh tone.

  • rcannon asked 10 years ago
  • last active 9 years ago
0 votes
12k views

Is there any way that I can make it where a text annotation is always above the box annotations? Right now it seems to give a greater Z-Index to whatever annotation was last rendered onto the chart as the chart is panned, so I end up with some box annotations in front of the text annotation and some behind.

Thanks for your help, I appreciate it.

Greg

0 votes
13k views

I would like to have a line chart where only some of the markers along a given trace are highlighted. For example, to be able to click with the mouse on several points along a line and have them change from regular point markers to looking like a rollover marker.

One way I can think to do this is to overlay an xy scatter series on top of a line series, and when the user toggles points with the mouse, add or subtract them from the data source for the scatter series. Is this a reasonable way to do this, or is there a better way?

Thanks,
Jerry

0 votes
8k views

Trying to get a Horizontal Y Axis Title. Why doesn’t this work?

<Style x:Key="AxisTitleStyle" TargetType="s:AxisTitle">
            <Setter Property="Orientation" Value="Horizontal" />
</Style>

...

        <s:SciChartSurface.YAxis>
            <s:NumericAxis AxisTitle="Axis Title" TitleStyle="{StaticResource AxisTitleStyle}"/>
        </s:SciChartSurface.YAxis>

Title is still Vertical.

  • Mike A asked 8 years ago
  • last active 8 years ago
0 votes
10k views

I’m happy with most of the themes but there are at least two things that I want to change:

  • the Electric theme, the foreground and background color choices for the x-axis label on the vertical slice modifiers make the text almost unreadable so I need to change one or both colors

  • the BrightSpark theme hides the minor tick marks and I want to make them visible

Can I tweak such things with the built in themes, do I need to delete the built in theme and recreate it, or what exactly?

0 votes
9k views

I’m trying to plot a vertical bar (column) chart where each bar represents a chemical element. Rather than the bars being “side by side”, using (say) an incrementing X value (1,2,3…), I was hoping I could use the chemical elements’ masses, resulting in a chart where the bars are “spread out” along the X-axis in a non-uniform way.

Here are some example X-values from a series I’m trying to plot – while the first few are fairly uniform, note the large gap before the last two:-

201.970627
202.972336
203.972
204.972
205.974457
206.975876
207.976639
235.043915
238.050781

If I try and render these using a FastColumnRenderableSeries, it starts off okay but goes a bit crazy with the last couple of bars! As I understand it, this series type doesn’t support gaps in the data, so I’m assuming this is to blame for the corrupt display.

Can you suggest any alternative approaches to what I’m trying to achieve? I’ve tried the FastImpulseRenderableSeries, which gives results very close to what I’m looking for. Unfortunately the inability to make the impulse lines wider is a showstopper for the client.

0 votes
21k views

When displaying a graph in a chart, I would like to set my own range and tickmark values. So when setting a range from -0.15 to 0.65 with the majortickmark set to 0.1, I would like to see Yvalues of 0.65, 0.55, 0.45, 0.35 till -0.15.
When using it now, it will move the axis to display nice round numbers
(see green graph in the attachment).
How can I do this?

Thanks,
Egbert

0 votes
12k views

Hi guys,

I purchased sci chart recently and have been using it in our trading applications. We have a requirement to produce some reports around our activity that are not numeric or date time on the x-axis.

I assumed sci chart would be able to handle text on an axis but it seems that it cant. Is there any work around to this?!

We really do not want to have to buy another charting package just to produce some simple charts and we love sci chart for everything else…

0 votes
7k views

Hi there,
I have the following challenge:
I have two time-based stock charts. One standard candle-chart (1-day period) and one renko-chart.
Renko-chart has different scaling and is also not linear on the x-axis.

What I want to achieve is a synchronization of both charts when moving one of the charts.
* Moving candle-chart -> middle of the renko-chart should jump to the middle time-value of the candle-chart
* Moving renko-chart -> middle of the candle-chart should jump to the middle time-value of the renko-chart

I created two separate controls for this (L10 Presentation Layer\L10x2 Controls WPF\Charts) and places them in one container control (L10 Presentation Layer\L10x2 Controls WPF\Charts\ctlCharts)

Thanks and Regards

Michael

-1 votes
9k views

Hello,
i want to do the same Zoom of this application(like the picture ) but in my application i don’t use the MVVM ! i think that the problem is in this step :
public ActionCommand SetRubberBandZoomModifierCommand { get { return new ActionCommand(() => SetModifier(ModifierType.RubberBandZoom)); } }
i haven’t the ModifierType in my application so how can i replace it in my Scichart ! and thank you!

  • sahar Les asked 9 years ago
  • last active 9 years ago
1 vote
12k views

Hi there,

I’m writing an ECG display and I use a fixed chart (0-10 sec X axes) and append data. When it draws to the right edge (time = 10 sec), I reset time to zero for series to reappear at the left edge. I don’t clear the chart, because I don’t want to clear previous data so I use the FIFO buffer for erase after 9 sec.

There is a problem. When I reset the time, the last line drawn is a horizontal line (from x =10 (the right edge) to x=0 (the left edge)
), because the line I believe has X1=rightedge and X2=leftedge. How can I set the X2= rightedge or make the series to begin at X=0 ?

int count = 0;
double time = 0;
double cont = 10;
public void Plot()
{
while (stop == false)
{
Dispatcher.BeginInvoke((Action)delegate
{
if (bufSampleFiltered.Count() > count)
{
short[] sample = bufSampleFiltered[count].value;
time = time + bufSampleFiltered[count].milliseconds;
count++;
if (time > cont)
{ time = 0; cont = +10; }

                    ((WpfDisplaySciChartViewModel)myWpfDisplaySciChart.DataContext).Plot(sample, time);


                }
            },
            DispatcherPriority.Render);
            if (stop == true)
                break;

            Thread.Sleep(1);
        }
    }

Thanks!

0 votes
0 answers
6k views

Hi everyone,

I have 3 series for my stacked columns chart: red, blue, green. Sci-chart draws a small line for blue series when the value is zero.

an unexpected blue line between red and green series

What is the recommended way to hide that line on each column?

Thanks for your support!

  • Chanh Le asked 8 years ago
  • last active 8 years ago
1 vote
7k views

Hi,

Is it possible to use non .Net types in a DataSeries?
I need to use complex types like this…

XyDataSeries<DateTime, ComplexTypeObject>

I need to store additional property to a series point, Is it possible? or is there a different way of doing it.

I tried doing it like this

public class DataValue : ISeriesPoint<double>, IComparable 

but it doesn’t work.

Thanks,
Benjamin

1 vote
9k views

Hi,

I’m trying to have the axis in an arbitrary position on the graph much like this one https://www.scichart.com/questions/question/different-position-of-x-axis . But as Andrew states in that post, this workaround no longer works on 3.0+ . Is there another workaround that can be used to achieve the same result?

Thank you

  • kewur asked 10 years ago
  • last active 9 years ago
0 votes
10k views

Hi,

I’m using SciChard version 2 successfully in a new, small project. But my big application is much more complex and currently generates hundreds of compile errors after installing version 2. Is there a way to run SciChart versions 1 (1.7, I guess) and 2 side-by-side while I’m adjusting my code to deal with all the breaking changes?

Thanks,
–George

0 votes
8k views

Using MVVM, I have an AnnotationCollection databound to the SciChartSurface.Annotations. Individual LineAnnotations are added to the collection as the application code runs.

If annotations are added while the chart is displayed, they are all drawn correctly.

However, if the chart page is reloaded (say, the user navigates to a different page and then returns to the chart page), the annotations do not always redraw. If the annotations have AnnotationCanvas set to default (AnnotationCanvas.AboveChart, I believe) they redraw correctly about 50% of the time. If the annotations’ AnnotationCanvas is set to AnnotationCanvas.XAxis, they never redraw.

All the annotations still exist in the ObservableCollection in all these cases, so they shouldn’t need to be re-created.

Is this a bug in SciChart or is there something I may be doing wrong with the annotations?
(There is only one X-Axis so no axisID is necessary.)

LineAnnotation lAnno = new LineAnnotation();
lAnno.CoordinateMode = AnnotationCoordinateMode.RelativeY;
lAnno.Y1 = 0.0;
lAnno.X1 = DataPoints;
lAnno.Y2 = 1.0;
lAnno.X2 = DataPoints;
lAnno.YAxisId = "Counts";
lAnno.Foreground = new System.Windows.Media.SolidColorBrush(System.Windows.Media.Color.FromRgb(255, 255, 255));
lAnno.Stroke = new System.Windows.Media.SolidColorBrush(System.Windows.Media.Color.FromArgb(96, 255, 0, 0));
lAnno.StrokeThickness = 2;
lAnno.AnnotationCanvas = AnnotationCanvas.XAxis;

Markers.Add(lAnno);
0 votes
9k views

I am currently evaluating and trying to find out if it is possible to draw the y-axis in the middle of the chart. Is this possible?

Like the alignment for left and right an alignment like “middle”. The sample only shows left and right alignment.
If it is not build in. Would it be possible to code a custom position? (But not by changing the source of SciChart but rather extending it).

I would need it for 2 scenarios:
A “running” chart like the FiFo Chart of the samples with the y-axis in the middle.
Like so (the pipe being the y-axis). First line the initial state. Second line after 3 ticks:
-1-2-3-4-5-|-6-7-8-9-
-4-5-6-7-8-|-9-10-11-12-

And a y-axis fixed chart like: y-axis at position 0 and the axis extending to the left with negative values and extending right with positive values (but at any possible position not just 0).

-(-5)-(-4)-(-3)-(-2)-(-1)-|-1-2-3-4-5-

I would have the same question for the x-Axis but I haven’t looked into x-axis configuration myself yet.

  • Uwe Hafner asked 9 years ago
  • last active 9 years ago
1 vote
9k views

Hi,
is there a way to store an additional value to the XyDataSeries.
In my case I want to store some additional information (string) while recording.

Regards Markus

3 votes
17k views

…sucks. Likely a programming error.

Trying to show a larger chart which has 16000 annotations on it. Besides that being a programming error at this point – we do / will have zoom out charts with that many data points.

I spend minutes, literally, in

Annotations.Add – no way to add an enumeration of them.

SuspendUpdates

has been called around this – so updates SHOULD not happen, but it seems there is a lot of overhead here.

What is adviced?

Besides that slowness in creating the chart, it is also (very) slow to change sizes etc.

Any advice for a heavily annotated chart?

1 vote
10k views

I am evaluating SciChart for an upcoming project. I like what I see for WPF and a standard console.
My problem is that SciChart for the web only shows projects for Silver Light.

Silver Light is dead. Win RT is gasping its last breath. Everthing seems to be moving towards HTML5 / JS.

I need to be able to use the charts in a web browser as well as a console.
Is there new versions of SciChart coming out that addresses this issue.

Regards
Bill Johnson

0 votes
11k views

Hello all,

I developed my application with the library Scichart and the customer is so happy about this new graph so for this we purchase a license for one developer, i install it and my desktop and it runs good but when i generated the executable (application.exe) and i run it in another desktop the entity of scichart exist (like picture bug) !!! but when i run it in my desktop it not exist !!!
So my question : why the entity “Powered by Scichart” exist when i run my application.exe in another desktop in spite of we purchase the license !!
Thank you

Best Regards, SaharBeanair

0 votes
9k views

Hi,

Quick one: take the Stacked Columns (side by side) example. The first and last columns are only half visible which I can see kind of makes sense for NumericAxis as you can specify a grow factor.  But for CategoryDateTimeAxis, this still happens and GrowBy only grows the axis on the right hand side and with categories as dates, you tend to want to see all of the categories labelled correctly.

How can we make sure that the first and last cateogories/bars are shown in their entirety? I’m tempted to just add single “Padding Dates” to either side of the data-set but the purist in side of me feels wrong doing that.

Many thanks

 

0 votes
11k views

Hey guys,

I have a couple of KeyBindings (up/down keys) that do custom stuff in my Chart.

Unfortunately, though – if I use the Shift + Up or Shift + Down key combinations, the old directional key logic comes back in, and I lose keyboard focus of the Chart Surface.

I am trying to disable it by using KeyboardNavigation.DirectionalNavigation=”None”, but I’m not having any luck.

Have you guys got a solution for me, to disable Directional Navigation on the SciChartSurface?

I would prefer not to add key bindings for Shift + Up that does nothing – just to make sure the event isn’t propagated up the chain, if possible.

Thanks,
Miles

0 votes
10k views

Hello,

I am evaluating SciChart and have been very impressed so far with the power and ease of use.

I have a need to plot a single series Mountain style chart with 64K data points and then update around 10 times a second. The X values are fixed, the Y values may vary from update to update.

Is there a way to prevent redraws while I am updating the data in the series (planning on using a loop calling dataSeries.Update(TX, TY) for each point unless you can suggest a better way)

Thanks and Kind Regards

Mark

0 votes
7k views

Hello,

When adding a VerticalSliceModifier to a chart, the axis label background color always shows up white, instead of the stroke color like in the examples. How can I change this property?

private void OnCreateSliceClick(object sender, RoutedEventArgs e)
{
       MouseButtonEventHandler mouseClick = null;
        mouseClick = (s, arg) =>
          {
                    this.MouseLeftButtonUp -= mouseClick;

                    var mousePoint = arg.GetPosition((UIElement)this.sciStripChart.GridLinesPanel).X;

                    var slice = new VerticalLineAnnotation()
                    {
                        X1 = this.sciStripChart.XAxis.GetDataValue(mousePoint),
                        Style = (Style)Resources["sliceStyle"]
                    };

                   sliceModifier.VerticalLines.Add(slice);
         };

         this.MouseLeftButtonUp += mouseClick;

}

  <s:SciChartSurface.ChartModifier>
             <s:ModifierGroup>
                        <s:VerticalSliceModifier Name="sliceModifier"/>
              </s:ModifierGroup>
  </s:SciChartSurface.ChartModifier>


<Style x:Key="sliceStyle" TargetType="s:VerticalLineAnnotation">
            <Setter Property="ShowLabel" Value="True"/>
            <Setter Property="Stroke" Value="#427EF6"/>
            <Setter Property="IsEditable" Value="True"/>
            <Setter Property="LabelPlacement" Value="Axis"/>                          
</Style>
1 vote
0 answers
8k views

Hi,

I have a mountain chart with a rollover modifier. The last point in the graph doesn’t have a tooltip for the Y-Value. I can see the x value, but not the Y value. If it matters at all, I use right to left flow. I attached a screenshot of the chart. Any help is appreciated.

0 votes
11k views

I used to use MouseManager.MouseEventGroup to link the RolloverModifier between different panes and I can’t seem to get that to work anymore. Is there a difference in how it works now?

Thanks for the help.

0 votes
11k views

Hello,
The SciChartOverview is great, it provides exactly the functionality that I needed for panning and zooming. The only problem is that from what I have found until now it works only on the x axis.

Is there an easy way to have exactly the same zooming and panning functionality provided by the SciChartOverview on the Y Axes? I just need the zooming and panning, not the data preview.

I tried to do this by modifying the ControlTemplate of the NumericAxis control, but I quickly got into trouble, and this seems like a little bit too much work anyway.

Is there a simple way to do it with SciChart?
I added an image with a similar control that does this.

  • Straliciuc asked 12 years ago
  • last active 5 years ago
1 vote
7k views

Hi,
I have a problem with 2D heatmap performace due to lots of data. I tried some tips to increase performance (rendering priority, resampling etc.) but it is insufficient. I read a scichart forum about 2D heatmap performance and I found answer about possible performance improvement in future (https://www.scichart.com/questions/question/heatmap-2d-performance). I would like to ask you if there is any performance improvement in newer scichart version. Actually I’m working with version 4.0.5.8187.

Thanks for your answer.

0 votes
17k views

Have a good day.

I’m working with scichartsurface, where I’m drawing a lot of lines with the help of IRenderContext2D. I’ve found out that this way of drawing took too much memory. For example when I displayed only surface, it took only ~80 Mb (Image 1), but when I displayed the graph using checkbox, began to scroll and pan my graph, the usage of memory increased to ~160 Mb (Image 2).
What is the reason of such behaviour?

Thanks in advance

I’ve attached the project: https://yadi.sk/d/cYP6RFVXhfjRS

  • Egor asked 9 years ago
  • last active 9 years ago
0 votes
13k views

Hello Everyone,

I am using trial version of Sci Chart. I am interested in using sci chart to build a stock charting program. I would be glad if someone can help me. Though I am using vb.net but you can post code in c# also.

Q-1) How to change the color of a particular candle or wick For e.g how to change color of five candle of my choice. I had used property UpWickColor and UpBodyBrush but it effects all data series.

Thank you,

Cheers,
Saurabh

  • Saurabh asked 9 years ago
  • last active 9 years ago
0 votes
10k views

Good day.

Changing RolloverModifier SourceMode property to AllSeries, AllVisibleSeries and etc. take no effect.
In collection RolloverModifier.SeriesData.SeriesInfo we have only charts, that currently visible in chart field.
Is that bug?

Best regards
Sam

0 votes
8k views

I do not seem to be able to set the property YAxis.Visibility of BaseRenderableSeries as part of a Trigger.

<Style TargetType="s:BaseRenderableSeries">
        <Style.Triggers>
            <Trigger Property="IsVisible" Value="True">
                <Setter Property="YAxis.Visibility" Value="Visible"/>
            </Trigger>

            <Trigger Property="IsVisible" Value="False">
                <Setter Property="YAxis.Visibility" Value="Collapsed"/>
            </Trigger>
        </Style.Triggers>
    </Style>

I want to make the associated yAxis Visiblity be a function of whether the matching Renderable Series is visible or not. I checked and BaseRenderableSeries has a YAxis property that can be set. Why is “YAxis.Visibility” in the setter property throwing an error in xaml?

Note: I have multiple yAxes in one surface and each renderable series has its own yAxis

Thanks

  • bbmat asked 8 years ago
  • last active 8 years ago
0 votes
11k views

Since Google have dropped their support for Silverlight in Chrome the online demo pages no longer work. Just wondering if you will be fixing this so that people can view the demos in Chrome again? Thank you.

  • sdavies asked 9 years ago
  • last active 8 years ago
0 votes
9k views

Hi,
I’m testing the SciChart control and got a problem: in OhlcSeriesInfo property XValue and YValue empty or null.
Please see small example:

  • Serge V. asked 10 years ago
  • last active 10 years ago
0 votes
12k views

Hi, is it possible to render the X-axis labels vertically? I’m using an ILabelFormatter to output long-ish strings, so they need to be rendered vertically due to the limited space available along the axis.

Thanks in advance.

0 votes
7k views

hi,
How can i StrokeEndLineCap = Flat for a FastLineRenderableSeries without using CustomRenderableSeries?
please help.

thanks.

  • vibin1307 asked 8 years ago
  • last active 8 years ago
0 votes
0 answers
8k views

Hi there,

if I use a ScaleTransform, the Fonts (e.g. axis text) are rendered with higher resolution – the chart is only scaled.
Is there a possibility to increase the render resolution for the chart also?

The intent is to print the chart with higher resolution.

Thanks and regards

  • miri asked 9 years ago
0 votes
10k views

Hello

I’m trying to acess ranges and build my code around this but Axis.GetMaximumRange() returns an incorrect value. It works correct after window_loaded event. What should I call to have correct range in axis?
I’ve attached sample project which shows 2 diagnostic traces, first is wrong, second is OK. Looks like while calling first renderable serie does not contain dataseries.

0 votes
10k 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?

0 votes
13k views

Hi,

How can I capture an event (mouse event or something like that) in my ViewModel after zooming or panning the chart.

Thanks,
Egbert

Showing 51 - 100 of 4k results

Try SciChart Today

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

Start TrialCase Studies