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

0 votes
17k views

Hi,

I’m trying to achieve the looks of DateTimeCategory XAxis as shown on uploaded screenshot.

Formatting a single row of tick labels is not a hard task (setTextFormatting). The problem arises when there are 2 rows with same frequency (days of the week and dates) and third row with lower frequency (years).

I tried using new line character in text formatting property to break the line for days and dates and it didn’t work. I also tried having two axes bound to the same data series, each one having different formatting and majorDelta, but it seems that they don’t stack up (only first one added is shown).

Any ideas?

  • Igor Peric asked 7 years ago
  • last active 7 years ago
1 vote
17k views

I would like to show the Y values of the slice on a special panel. So far I have not yet found out how to disable the tooltips that appear next to the annotation line. I have tried to add a ToolTipOpening handler to the anntotated line, to the modifier and to the chart surface but it does not get called.

What should I do?

0 votes
17k views

Hello,
I would like to allow user click on Legend and highlight the corresponding Series on the chart but I don’t know if this feature is supported or not.

I tried to add mouse events to the Legend Modified but it seems like mouse events are not triggered

This is the simple code that I am using

<s:LegendModifier x:Name="chlLegend" ShowLegend="True" LegendPlacement="Top" Orientation="Horizontal" MouseDown="chlLegend_MouseDown" ScrollViewer.HorizontalScrollBarVisibility="Auto" />

Before investigating more I would like to ask you if you have any hints which is the correct way to implement this behavior.
Is the LegendModifier suitable for this or should I override instead the Legend Control Template?

Thank you in advance for the support

2 votes
17k views

I’m trying out polar chart for my specific needs. In my scenario x-axis needs to display 0-360 (angle) values starting from bottom and going counter-clockwise so that 0 is at the bottom, 90 is at right, 180 is at the top and so on. Looking at polar chart default x-axis display it starts from right and go clockwise. Is there any way to change this behavior?

1 vote
17k views

In my project the output panel showing the following binding errors

System.Windows.Data Error: 40 : BindingExpression path error: 'Exponent' property not found on 'object' ''DefaultTickLabelViewModel' (HashCode=56110932)'. BindingExpression:Path=Exponent; DataItem='DefaultTickLabelViewModel' (HashCode=56110932); target element is 'TextBlock' (Name=''); target property is 'Text' (type 'String')
System.Windows.Data Error: 40 : BindingExpression path error: 'HasExponent' property not found on 'object' ''DefaultTickLabelViewModel' (HashCode=56110932)'. BindingExpression:Path=HasExponent; DataItem='DefaultTickLabelViewModel' (HashCode=56110932); target element is 'TextBlock' (Name='exponent'); target property is 'Visibility' (type 'Visibility')
System.Windows.Data Error: 40 : BindingExpression path error: 'Separator' property not found on 'object' ''DefaultTickLabelViewModel' (HashCode=9331561)'. BindingExpression:Path=Separator; DataItem='DefaultTickLabelViewModel' (HashCode=9331561); target element is 'TextBlock' (Name=''); target property is 'Text' (type 'String')

my Line chart view code is here (I can’t able to make attachment)

<UserControl x:Class="Instron.Database.Presentation.DatabaseViews.Views.Visualization.LineChartView"
             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:SciChart="clr-namespace:Abt.Controls.SciChart;assembly=Abt.Controls.SciChart.Wpf.3.0"
             xmlns:s="http://schemas.abtsoftware.co.uk/scichart" 
             mc:Ignorable="d" Width="Auto" Height="Auto"   
             xmlns:gbl="clr-namespace:Instron.Database.Presentation.DatabaseViews.Globalization">

    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="ContentControlDataTemplate.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>

    <Grid >

        <TextBlock  FontSize="24" 
                    HorizontalAlignment="Center"
                    VerticalAlignment="Center"
                    TextWrapping="Wrap"   
                    Foreground="DimGray"
                    Visibility="{Binding IsAxisVisible,Converter={StaticResource  NotBooleanToVisibilityConverter}}" >
                    <TextBlock.Text>
                        <gbl:TranslateExtension>
                            <gbl:TranslateExtension.DesignTimeText>Either X or Y axis do not contain sufficient data</gbl:TranslateExtension.DesignTimeText>
                            <gbl:TranslateExtension.StringId>010000123</gbl:TranslateExtension.StringId>
                        </gbl:TranslateExtension>
                    </TextBlock.Text>
        </TextBlock>

        <s:SciChartSurface x:Name="sciChart" ChartTitle="{Binding ChartName}" Style="{StaticResource SciChartSurfaceStyle}"   Visibility="{Binding IsLegendVisible,Converter={StaticResource  BoolToVisibilityConverter}}" 
            GridLinesPanelStyle="{StaticResource GridLinesPanelStyle }"  RenderableSeries="{Binding RenderableSeries}"  Margin="0,-5,0,-10"
               DataContextChanged="sciChart_DataContextChanged" Rendered="sciChart_Rendered"  ViewportManager="{Binding ViewportManager}">

            <s:SciChartSurface.ContextMenu>
                <ContextMenu >
                    <MenuItem  Command="{Binding SaveAsCommand}">
                        <MenuItem.Header>
                            <gbl:TranslateExtension>
                                <gbl:TranslateExtension.DesignTimeText>SaveAs</gbl:TranslateExtension.DesignTimeText>
                                <gbl:TranslateExtension.StringId>010000126</gbl:TranslateExtension.StringId>
                            </gbl:TranslateExtension>
                        </MenuItem.Header>
                    </MenuItem>
                    <MenuItem  Command="{Binding CopyCommand}">
                        <MenuItem.Header>
                            <gbl:TranslateExtension>
                                <gbl:TranslateExtension.DesignTimeText>Copy</gbl:TranslateExtension.DesignTimeText>
                                <gbl:TranslateExtension.StringId>010000127</gbl:TranslateExtension.StringId>
                            </gbl:TranslateExtension>
                        </MenuItem.Header>
                    </MenuItem>
                    <MenuItem  Command="{Binding PrintCommand}">
                        <MenuItem.Header>
                            <gbl:TranslateExtension>
                                <gbl:TranslateExtension.DesignTimeText>Print</gbl:TranslateExtension.DesignTimeText>
                                <gbl:TranslateExtension.StringId>010000128</gbl:TranslateExtension.StringId>
                            </gbl:TranslateExtension>
                        </MenuItem.Header>
                    </MenuItem>
                </ContextMenu>
            </s:SciChartSurface.ContextMenu>

            <s:SciChartSurface.XAxis>
                <s:NumericAxis  AutoTicks="False" GrowBy="0.05, 0.05"  
                                DrawMajorGridLines="{Binding IsLegendVisible}"  DrawMinorGridLines ="False"
                                AxisTitle="{Binding XAxisName}"  TitleStyle="{StaticResource AxisTitleStyle}" TickLabelStyle="{StaticResource AxisLabelStyle}" 
                                LabelProvider="{Binding XLabelFormatter}"
                                MajorDelta="1" MinorDelta="0.2"
                                 />
            </s:SciChartSurface.XAxis>

            <s:SciChartSurface.YAxis>
                <s:NumericAxis  GrowBy="1, 1" TickLabelStyle="{StaticResource AxisLabelStyle}" DrawMajorGridLines="{Binding IsLegendVisible}"
                                AxisAlignment="Left"  DrawMinorGridLines ="False"
                                AxisTitle="{Binding YAxisTitle}" 
                                TitleStyle="{StaticResource AxisTitleStyle}" />
            </s:SciChartSurface.YAxis>

            <!--  Adding the ZoomPanModifier gives SciChart the ability to pan on mouse-drag  -->
            <s:SciChartSurface.ChartModifier>
                <s:ModifierGroup>
                    <s:XAxisDragModifier ClipModeX="ClipAtExtents"/>
                    <s:YAxisDragModifier ClipToBounds="True" />
                    <s:RubberBandXyZoomModifier x:Name="rubberBandZoomModifier" IsEnabled="True" IsXAxisOnly="False" ZoomExtentsY="False" IsAnimated="True"/>
                    <s:ZoomExtentsModifier x:Name="zoomExtentsModifier" ClipToBounds="True" ExecuteOn="MouseDoubleClick"/>
                    <s:LegendModifier x:Name="legendModifier" GetLegendDataFor="AllVisibleSeries" />
                </s:ModifierGroup>
            </s:SciChartSurface.ChartModifier>

        <s:SciChartSurface.Annotations>
                <s:CustomAnnotation>
                    <s:CustomAnnotation.ContentTemplate>
                        <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>
                    </s:CustomAnnotation.ContentTemplate>
                </s:CustomAnnotation>
            </s:SciChartSurface.Annotations>
        </s:SciChartSurface>
    </Grid>
</UserControl>
  • Raghupathy asked 10 years ago
  • last active 9 years ago
1 vote
17k views

I have a chart with a range of 0..1000(xAxis)
Secondly i call;

var xCalc = this.XAxis.GetCurrentCoordinateCalculator();
double xDataValue = xCalc.GetCoordinate(500);

xDataValue is for example equal 500;

Next step:
I change the range via:

XAxis.VisibleRange.SetMinMax(1000,2000)
// Secondly i call;
var xCalc = this.XAxis.GetCurrentCoordinateCalculator();
double xDataValue = xCalc.GetCoordinate(1500);

xDataValue shall also be equal 500 or? (but it is negative -XXX)???

I call

SciChart.XAxis.VisibleRange.SetMinMax(min, max);

in my ChartViewModel and

var xCalc = this.XAxis.GetCurrentCoordinateCalculator();
double xDataValue = xCalc.GetCoordinate(1500);

in my ChartModifier..

1 vote
17k views

I made an example based on the “Vertically Stacked Axes” from SciChart Examples. The main difference is that I can add DataSeries / YAxes on the fly.

The problem is that when I set VisibleRange and VisibleRangeLimit it does not crop the trace (as you can see on the Tan traces that are drawn on the whole surface).

Is there any way to crop the traces to VisibleRange of corresponding Axis?

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

Hello!
I have a license key for scichart. After update to version 3.2 my boss’s computer show the error “Sorry! Your trial of SciChart has expired. …”
When i started my program on my computer or colleague’s computer, it’s work. But when i run program on boss’s computer than scichart think that trial expired =( With old version 3.1 all works.
I think the problem is that once used a trial version.
How i can fix it?

0 votes
17k views

Good day, everybody!
I’ve got a problem. I’m working with inherited class from LineAnnotation- MarkerLineAnnotation. I’ve added some fields to the class. When I set X1=0 and X2=100000, displayed the element on SciChartSurface, I tried to zoom in. But after a few zooms my MarkerLineAnnotations had disappeared.
After that situation I set X1=0 and X2=10000 and tried to zoom in. I could zoom in my custom annotations for a long time, but they had disappeared too.

How can I solve this problem?
I’ve attached screenshots describing this problem. (Image 1-normal size for line with X1=0 and X2=10000 , Image 2-zoom, when disappearing took place for line with X1=0 and X2=10000; Image 3-normal size for line with X1=0 and X2=100000 , Image 4-zoom, when disappearing took place for line with X1=0 and X2=10000)
Thanks in advance.

  • Egor asked 10 years ago
  • last active 10 years ago
0 votes
17k views

We were recently asked on priority support tickets ‘How do I ZoomExtents a SciChartSurface to a specific range, e.g. VisibleRangeLimit, when double clicking on the chart’.

For the benefit of our user-base our solution is below.

1 vote
17k views

Hi, I am displaying no of BoxAnnotation , I want to link some of the BoxAnnotation randomly .I want to perform the operaton on annotation with relation.When it move BoxAnnotation,related link should also move accordingly.I am also performing Y axis with yaxisID so Annotation also move to Y direction with Y axis.
Please help me out.
Thanks

1 vote
17k 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-dev.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
17k views

Have a good day!

In the new SciChart version (5th august) I’ve got this result of painting line using palette provider (image 1). Is there any way to make it look like this (image 2)?

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

I like the BlackSteel theme for the data chart, but like to modify a little bit of it. Is there a way for me to use the blackSteel theme that come out of the box as a start, and customize it a little to meet our customer’s needs?

Thanks,

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

Hi,

I have a scichart surface defined in xaml like this,

<local:SciChartSurface x:Name="_ChartSurface"  Annotations="{Binding ChartAnnotations}">

        </local:SciChartSurface>

In the code behind I have ChartAnnotations defined as,

 public const string ChartAnnotationsPropertyName = "ChartAnnotations";
        private AnnotationCollection _ChartAnnotations = new AnnotationCollection();
        public AnnotationCollection ChartAnnotations
        {
            get { return _ChartAnnotations; }
            set
            {
                if (_ChartAnnotations == value)
                    return;

                _ChartAnnotations = value;
                RaisePropertyChanged(ChartAnnotationsPropertyName);
            }
        }

 public ViewModelExample()
{  
  ChartAnnotations.CollectionChanged += ChartAnnotations_CollectionChanged;    
}

 void ChartAnnotations_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
        {
            RaisePropertyChanged(ChartAnnotationsPropertyName);          
        }

Than in the code behind, I just initialize and add some annotations to the ChartAnnotations collection to populate my chart. The problem is that my Annotations property on the scichart surface is still null, and the RaisePropertyChanged() is not affecting the Bindings at all. I’m certain that the DataContext is set right as other stuff in the graph works fine. I works when I explicitly set the surface’s Annotations property with my ChartAnnotations collection, but obviously this is less than ideal.

Is there an additional step that I’m missing here?

Thanks

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

Hi Andrew

We would like to be able to set SuspendUpdates in an MVVM scenario as we are using ObservableCollection of IChartSeriesViewModel to drive chart datatemplates.

We are getting some flickering when updating multiple series on the chart due to y axis rescaling.

Is there a bindable property on the SciChartSurface we can use for this? Or do you have another approach?

Thanks in advance
Regards
Ian

  • Ian Carson asked 10 years ago
  • last active 9 years ago
0 votes
17k views

Hello,

I’ve got multiple charts stacked vertically, united in one mouse event group and I’ve hidden all X axes except for the bottom one.

Now I need CursorModifier axis label to always show on the last chart regardless of what chart is receiving mouse events.

If I override IsMaster in ModifierMouseArgs in the OnModifierMouseMove to always be true, I’ve got partly what I need, but then the Y label (and horizontal cursor line) also shows on all charts, which is undesired.

Could you please point me in the right direction on this?

  • gman asked 11 years ago
0 votes
17k views

Can you please provide some examples of how to alter the formatting of a DateTimeAxis axis. I’d like to show the date and the time component that also supports localization based on the user regional settings.

0 votes
17k views

Hi,

I have a VerticalLineAnnotation that can be dragged over the chart by clicking and dragging on the line itself. (See attached image). The problem is, whenever I put the chart in front of a user, they try to drag by clicking on the label (the blue label with the time in the image).

How can I make this label draggable like the line?

Thanks.

0 votes
17k views

I am using WPF with SciChart version 1.3.1.1107 and the MVVM pattern.
I am using a series of modifiers like the ZoomPanModifier in a similar manner to samples that you provide that I load from an attached behaviour.

I am adding a feature to adjust the visible range when new data points arrive that would not otherwise be visible; however, if a user pans the surface I want to detect that so I can stop adjusting the visible range.

My thinking is that I need to capture a mouse event either associated with the chart to the current modifier; however, nothing I seem to do allows me to capture a mouse event. If their is a better way I am open to that as well.

1 vote
17k views

Hello,

I have to draw vertical straight line and horizontal curved line. Here is the requirements,

  • Before two lines intersect they should draw as dashed lines
  • After two lines intersect they should draw as solid lines
  • Both the lines should be move by clicking mouse pointer
  • And background color of lines intersect area should be white, other places should be gray color

I could draw the vertical line using two VerticalLineAnnotations however I don’t know how to draw curved line and implement above requirements. Please refer the attached sample image file.

Thanks.

1 vote
17k views

Hello. I need to provide custom point marker with height and width based on my data, but trying to implement BasePointMarker I have the center points but not the original data to make the width and height based in my original binding. Is there a solution to do that? Thank you.

Tommy Garcia.

1 vote
17k views

Hi there,

I am currently evaluating SciChart for use within a new piece of software we are developing. One important feature that we need to provide is to be able to draw a polygon and determine which points are contained within it. Then the colour, visibility, etc of these points can be changed. I can see from your documentation that this could be achieved by creating a custom chart modifier to draw lines that make up the shape and then implement my own algorithm to determine which points are contained within it. Before I embark on this route, could you tell me if I have missed any implementation that already exists? Will the drawn polygon zoom and pan with the graph, therefore enclosing the same points?

Kind Regards,

Kathryn

3 votes
17k views

The issue I’m dealing with is that after setting up the SeriesSelectionModifier, I require a double-click (and a very, very precise double click, at that) to select a series. Naturally, this is also competing with the ZoomExtents() call that is the normal effect of a doubleclick.

<!-- Chart -->
        <scichart:SciChartSurface Grid.Column="1" Grid.Row="1" x:Name="sciChartSurface"
                                  SeriesSource="{Binding SeriesList, Mode=OneWay}"
                                  ChartTitle="{Binding Title}"
                                  >

            <scichart:SciChartSurface.XAxis>
                <scichart:NumericAxis x:Name="AxisX" Id="AxisX" AxisTitle="{Binding XTitle}" AxisAlignment="Bottom" />
            </scichart:SciChartSurface.XAxis>

            <scichart:SciChartSurface.YAxes>
                <scichart:NumericAxis x:Name="AxisY1" Id="AxisY1" AxisTitle="{Binding Y1Title}" AxisAlignment="Left"
                                      />
                <scichart:NumericAxis x:Name="AxisY2" Id="AxisY2" AxisTitle="{Binding Y2Title}" AxisAlignment="Right"
                                      IsEnabled="{Binding ShowY2Axis}"
                                      Visibility="{Binding RelativeSource={RelativeSource Self},
                                                           Path=IsEnabled,
                                                           Converter={StaticResource convBooleanToVisibility}}"
                                      />
            </scichart:SciChartSurface.YAxes>

            <!-- Modifiers -->
            <scichart:SciChartSurface.ChartModifier>

                <scichart:ModifierGroup>

                    <!-- TODO: Comment -->
                    <scichart:ZoomPanModifier ExecuteOn="MouseRightButton" />

                    <!-- TODO: Comment -->
                    <scichart:RubberBandXyZoomModifier IsEnabled="True" x:Name="rubberBandZoomModifier" IsXAxisOnly="False" ZoomExtentsY="False" IsAnimated="True"/>

                    <!-- TODO: Comment -->
                    <!--<scichart:RolloverModifier x:Name="rolloverModifier" DrawVerticalLine="False" UseInterpolation="True"  SourceMode="AllSeries" />-->

                    <!-- TODO: Comment -->
                    <scichart:CursorModifier x:Name="cursorModifer" SourceMode="AllSeries" UseInterpolation="True"/>

                    <!-- TODO: Comment-->
                    <scichart:ZoomExtentsModifier />

                    <!-- Exposes a LegendData property (of type ChartDataObject) which can be accesed via elementName from another control -->
                    <!-- ChartDataObject exposes a list of SeriesInfo -->
                    <scichart:LegendModifier x:Name="legend" GetLegendDataFor="AllSeries"/>
                    
                    <!-- Provides selection of series and custom styling options (to the selected series) -->
                    <scichart:SeriesSelectionModifier SelectedSeriesStyle="{StaticResource selectedSeriesStyle}" ExecuteOn="MouseLeftButton"
                                                      />
                    
                </scichart:ModifierGroup>
            </scichart:SciChartSurface.ChartModifier>

        </scichart:SciChartSurface>
1 vote
17k views

How can I only show Legends when the corresponding RenederableSeries is visible.
If the corresponding RenderableSeries is not visible then that Legend shouldn’t be shown.
Keep in mind my users will be able to hide and show RenderableSeries during runtime.

My xaml code is:

                                            <s:LegendModifier x:Name="legendModifier" ShowVisibilityCheckboxes="False" Orientation="Vertical" ShowLegend="{Binding ParentViewModel.ShowLegends, Mode=TwoWay}" Margin="10" />
                                        <s:SeriesSelectionModifier>
                                            <s:SeriesSelectionModifier.SelectedSeriesStyle>
                                                <Style TargetType="s:BaseRenderableSeries">
                                                    <Setter Property="StrokeThickness" Value="3"/>
                                                </Style>
                                            </s:SeriesSelectionModifier.SelectedSeriesStyle>
                                        </s:SeriesSelectionModifier>
0 votes
17k views

The default appearance for the vertical line annotation is for the series name and Y value to be displayed next to the data point. Is it possible to move this display elsewhere? On sine wave type data it doesn’t work so good because the text box moves up and down so much as the user scrolls the line annotation. Even just putting it at the bottom of the chart right above the X axis would be a huge improvement.

I assume this is a ControlTemplate modification type issue but I don’t know where to start looking.

0 votes
17k views

Hi,

According to the documentation, in FastCandlestickRenderableSeries

StrokeUp and FillUp styles are applied to bars with Close > Open, and StrokeDown and FillDown to those that have Open <= Close respectively.

I would like to ask is there any method to achieve the following:

The candlestick are green in color when Today Close >= Previous Close and red in color when Today Close < Previous Close

Thanks.

  • Ray Hung asked 7 years ago
  • last active 7 years ago
2 votes
17k views

Hi folks,

I haven’t been able to produce scatter charts using a XyScatterRenderableSeries. To demonstrate, I took a sample project you sent me earlier and replaced one line as shown below:

_chartSeries = new ObservableCollection<IChartSeriesViewModel>();
//var renderableSeries = new FastLineRenderableSeries { SeriesColor = Colors.BlueViolet};
var renderableSeries = new XyScatterRenderableSeries { SeriesColor = Colors.BlueViolet};
_chartSeries.Add(new ChartSeriesViewModel(ds0, renderableSeries));

With the original FastLineRenderableSeries, I see the chart. But with XyScatterRenderableSeries, the data does not appear. (Annotations remain visible, of course.)

Am I doing something wrong, or does the ChartSeriesViewModel not work with scatter charts?

Thanks,
–George

  • yefchak asked 11 years ago
  • last active 9 years ago
3 votes
17k views

Hi,

When we have 9 horizontal gridlines, we would also like to see 9 yvalues.

Is it possible to also show 300 and -500 on Yaxis1 and 500 and -300 on Yaxis2
(see attachment)

Thanks and best regards,
Egbert

0 votes
17k views

I want to build a column chart but I got the following error:

ERROR TypeError: Cannot read property ‘append’ of undefined

The error happened in line #42.

My code:

export class OutputAmplitudeComponent implements OnInit, OnDestroy {

constructor(@Inject(SETTING_SERVICE) private settingService: SettingService, private cdr: ChangeDetectorRef) {}

ngOnInit() {        
                this.settingService.registerSetting(HarmonicAmpSetting).pipe(takeUntil(this.ngUnsubHarmonicData)).subscribe(setting => {
                    const OutputAmplitudeData = setting.value;

                    for (let x = 1; x < this.numberOfOutput; x++) {
                        if (this.OutputMode === 'Voltage') {
                            if (phaseNum === 1) {
                                this.ampSource.data[x-1].voltage1 = OutputAmplitudeData[x];
                            } else if (phaseNum === 2) {
                                this.ampSource.data[x-1].voltage2 = OutputAmplitudeData[x];
                            } else if (phaseNum === 3) {
                                this.ampSource.data[x-1].voltage3 = OutputAmplitudeData[x]; 
                            }
                        } else if (this.OutputMode === 'Current') {
                            if (phaseNum === 1) {
                                this.ampSource.data[x-1].current1 = OutputAmplitudeData[x];
                            } else if (phaseNum === 2) {
                                this.ampSource.data[x-1].current2 = OutputAmplitudeData[x];
                            } else if (phaseNum === 3) {
                                this.ampSource.data[x-1].current3 = OutputAmplitudeData[x];
                            }
                        }

                    }   
                    this.updateData();
                });
                this.sciChartInit();
            }   

updateData(){
    var phaseNum1 = [];
    var xData = [];
    for (let x = 1; x < this.numberOfOutput; x++) {
        if (this.ampSource.data != null && this.ampSource.data[x-1] != null) {
            phaseNum1[x - 1] = parseFloat(this.ampSource.data[x - 1].voltage1);
            xData[x - 1] = x;
            if (!isNaN(phaseNum1[x - 1])) {
                this.dataSeries1.append(x,x);
            } else {
                console.log("No num");
            }
        }
    }
}       

async sciChartInit() {

    const { wasmContext, sciChartSurface } = await SciChartSurface.create("chart");

    var phaseNum1 = [];
    var xData = [];
    this.dataSeries1 = new XyDataSeries(wasmContext);
    for (let x = 1; x < this.numberOfOutput; x++) {
        this.dataSeries1.append(x, x);
    }

    const xAxis = new NumericAxis(wasmContext);
    sciChartSurface.xAxes.add(xAxis);
    const yAxis = new NumericAxis(wasmContext);
    sciChartSurface.yAxes.add(yAxis);

    const rendSeries1 = new StackedColumnRenderableSeries(wasmContext);
    rendSeries1.fill = "#dc443f";
    rendSeries1.stroke = "green";
    rendSeries1.strokeThickness = 1;
    rendSeries1.dataSeries = this.dataSeries1;
    rendSeries1.stackedGroupId = "one";

    const verticallyStackedColumnCollection = new StackedColumnCollection(wasmContext);
    verticallyStackedColumnCollection.dataPointWidth = 0.5;
    verticallyStackedColumnCollection.add(rendSeries1);
    verticallyStackedColumnCollection.animation = new ScaleAnimation({ duration: 1000, fadeEffect: true });

    sciChartSurface.renderableSeries.add(verticallyStackedColumnCollection);
    sciChartSurface.chartModifiers.add(new ZoomExtentsModifier(), new ZoomPanModifier(), new MouseWheelZoomModifier());
    sciChartSurface.zoomExtents();

    sciChartSurface.chartModifiers.add(
        new LegendModifier({
            placement: ELegendPlacement.TopRight,
            orientation: ELegendOrientation.Horizontal,
            showLegend: true,
            showCheckboxes: true,
            showSeriesMarkers: true
        })
    );
    return { wasmContext, sciChartSurface };
}}

I don’t understand what is undefined and why.

Thank you.

  • ETS Ong asked 3 years ago
  • last active 3 years ago
1 vote
17k views

Hello,
I’m using your package for price charting. And I need to put on one bar (or candlestick) several markers (for example several dots with different colours and sizes). Also sometimes I need to change size on some of these markers. Now I am doing this by putting CustomAnnotations. Is there a way to plot the same with for example XyScatterRenderableSeries to increase drawing speed?

Best regards,
Roman.

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

I have a WPF TextBlock control that I want to set the foreground color for based on the colors in the current SciChart theme (I want to make it the same color as, say, the axis titles). How do I access the color values for the current theme?

1 vote
17k views

How can i change default chart title style? like margin,font size etc

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

I was trying to figure out why I couldn’t get minor tick marks to appear on my axes and then I realized it’s because of the theme I was using (BrightSpark). Just a heads up to anyone else who may run into this.

IMO themes should not hide chart features such as tick marks.

0 votes
16k views

If there a way to bind series color/thickness to a custom control so the line color and thickness changes dynamically when user select a different color/thickness? I will need use this with the MVVM dataseries API.

0 votes
16k views

Hey there!

How do I set the interval between grid lines to be a fixed value?

For example, my xAxis is a DateTimeAxis and I want a grid line drawn at one hour intervals, regardless of zooming.

Same goes for my yAxis (NumericAxis)

Thanks

1 vote
16k views

hi, i have some issues with SciChartScrollbar control. i’m trying to use it like in the Custom Overview demo, but with possibility to contol zoom programmatically (by keyboard). So i bound SciChartScrollbar control’s property

Axis ="{Binding ElementName =XAxis}"

where XAxis is the axis from the top chart

     < s: SciChartSurface.XAxis >
        < s: NumericAxis x: Name ="XAxis"
                       DrawMinorGridLines ="True"
                       DrawMinorTicks ="True">
        </ s: NumericAxis >
    </ s: SciChartSurface.XAxis >

and then i change VisibleRange of top chart from code behind (previously i tried this without Scrollbar.SelectedRange)

        MainChartSurface.XAxis.VisibleRange.Min = Scrollbar.SelectedRange.Min = ((SpectraAnalysisTools )VM.AnalysisTools).ZoomMin;
        MainChartSurface.XAxis.VisibleRange.Max = Scrollbar.SelectedRange.Max = ((SpectraAnalysisTools )VM.AnalysisTools).ZoomMax;

eventually the top chart’s zoom works perfect but the bottom scrollbar moves only first time when value changed and never more again.
So my question is – what should i do to make the scrollbar control (like in Custom Overview demo) working with controlling from codebehind?

3 votes
16k views

I am currently adding line to a chart to show when a value is ON and using the gap in a series feature to indicate when the value is OFF. In order for this to work I need to update the chart every few seconds when the value is ON; however, I do not want to add additional points; instead I want to either update a point in the line series or I want to remove a point and then add a new point. In my case its the x-axis value that I need to change.

Can you please suggest if this is possible?
If yes I am also wondering how to best find a specific point in a line series.

1 vote
16k views

Hello,

I have ClipModeX=”ClipAtExtents” on my ZoomPanModifier. I need the same behavior on the y-axis, but there is no “ClipModeY”.

How do I prevent y-axis data from panning off the chart?

Thanks,
Neville

1 vote
16k views

I’m new to SciChart and I’m trying to play with stockcharts now. In the file ‘SciChart Class Library.chm’ in some places description is missing for example in DataSeries.Append Method I see [Missing documentation for “M:Abt.Controls.SciChart.DataSeries2.Append(0,`1[])”].

This is slows the progress to get clear understanding how things works. Is there any full description of the library, maybe I’m missing something?

  • ivankostin asked 11 years ago
  • last active 7 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

3 votes
16k views

Request for enhancement to polar charts to allow for rotation of the X axis. I want to use this chart type with compass directions. Therefore a range of 0-360 with 0 at the top of the chart.

I was able to use the workaround for rotation here:
https://www.scichart.com/questions/question/polar-chart-x-axis-starting-point-and-direction

However as the OP on that question noted there are several drawbacks to simply rotating the entire chart surface.
Also I found that at run-time rotating the chart surface is inaccurate as in this example:

Polar chart example

As you can see the 100 degree mark is not in the correct location. Directly right should be 90.

In the designer the chart axis looks as it should:

enter image description here

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

Hi

In terms of a oscilloscope for instance you can calculate what the time per division (time/div) is for the y-axis and the volts per division for the x-axis. This changes when you zoom in and out.

My question is how can I calculate these in the simplest way possible to calculate the volts per division according to the current zoom level?
You will obviously have inputs of the start frequency and amplitude when the application start or whenever these inputs changes on the units side.
But when you zoom in and out depending on whether you are zooming the y-axis or x-axis or both the time / div and volts / div needs to be calculated.

Thanks a lot Gert

  • Gertdt76 asked 10 years ago
  • last active 10 years ago
0 votes
16k views

I am using the CategoryDateTimeAxis to fetch data in minute resolution for a few days and then append realtime data in one second resolution to it. Since the CategoryDateTimeAxis uses equidistance calculations I was wondering if it is possible to override that behaviour somehow? I.e. can I control the distance calculation somehow?

I am currently switching to CategoryDateTimeAxis because DiscontinuousDateTimeAxis provides to much of a performance hit for our use case.

0 votes
0 answers
16k views

Hi,

I wonder, if it’s possible to force the SciChartSurface control to resize itself depending on a size of the actual data area, given that axis are in the auto-range mode. For example, when the Y range is large than X range, the entire control resizes into the portrait orientation, thus keeping square pixels in the data area.

Thank you in advance!
Ilia

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

I created a very simple project with a single grid and one element which is the scichart. Everything renders normally when the program first starts. If I make the window smaller vertically by dragging, everything continues to render correctly, but when I increase the height of the window by dragging, the vertical axis value label (4000.00) gets clipped if I go about 50 pixels more than the original window height specified.

Note: the clipping is all at once, if I go one pixel too far, the labels clip as shown. If I make the window one pixel smaller, they appear normally again.

What can I do?

Label Clipped

1 vote
16k views

Hi,

I need to implement a chart that looks pretty much like the attached one. The chart has the following requirements:
– the x-axis position is always at value 0.0
– the length (in pixel) the x-axis must always have the same length as the positive part of the y-axis
– the displayed data range on the y-axis must always be twice as much as on the x-axis (e.g 0-5 on x-axis means 0-10 on y-axis). So if the charts updates the visible range on the y-axis, the x-axis range must be updates as well and and vice versa.

I really don’t know if that’s even possible with Scichart? If yes could you please give me some initial help how to get this done?

Thx
Joerg

3 votes
16k views

Hi,

Can you tell me if it is possible to make a contour plot like on the image i have attached?

I cant seem to find a way to do that.

Best regards,
Jeppe

1 vote
16k views

I am adding charts with 10 million points.

With 40 million points the chart throws an OutOfMemoryException

In SciChart is there a limit on the number of points ? Or should I configure something?

  • I added 3 XyDataSeries<double, double> each with 10 million points. I get 7-8 FPS at the start, and 111-130 FPS when I zoom in.
  • I added 3 XyDataSeries<DateTime,Double> each with 10 million points: I get 2-3 FPS at the start, but when you zoom in the chart freezes.

Why such a difference if X data type is DateTime?

  • Nicholas asked 10 years ago
  • last active 10 years ago
0 votes
16k views

I am trying to implement the DigitalFastLine Series from the example given in ‘http://support.scichart.com/index.php?/Knowledgebase/Article/View/17224/37/how-to-make-line-series-draw-to-the-right-edge-of-the-chart’

public class LinesEnumerable : IEnumerable<Point>
{
    protected readonly IPointSeries _pointSeries;
    protected readonly ICoordinateCalculator<double> _xCoordinateCalculator;
    protected readonly ICoordinateCalculator<double> _yCoordinateCalculator;
    protected readonly bool _isDigitalLine;

    /// <summary>
    /// Initializes a new instance of the <see cref="LinesEnumerable" /> class.
    /// </summary>
    /// <param name="pointSeries">The point series.</param>
    /// <param name="xCoordinateCalculator">The x coordinate calculator.</param>
    /// <param name="yCoordinateCalculator">The y coordinate calculator.</param>
    /// <param name="isDigitalLine">if set to <c>true</c> return a digital line .</param>
    public LinesEnumerable(IPointSeries pointSeries, ICoordinateCalculator<double> xCoordinateCalculator, ICoordinateCalculator<double> yCoordinateCalculator, bool isDigitalLine)
    {
        _pointSeries = pointSeries;
        _xCoordinateCalculator = xCoordinateCalculator;
        _yCoordinateCalculator = yCoordinateCalculator;
        _isDigitalLine = isDigitalLine;
    }

    /// <summary>
    /// Returns an enumerator that iterates through a collection.
    /// </summary>
    /// <returns>
    /// An <see cref="T:System.Collections.IEnumerator" /> object that can be used to iterate through the collection.
    /// </returns>
    public virtual IEnumerator<Point> GetEnumerator()
    {
        return _isDigitalLine ?
            (IEnumerator<Point>)new DigitalLinesIterator(_pointSeries, _xCoordinateCalculator, _yCoordinateCalculator) :
            new LinesIterator(_pointSeries, _xCoordinateCalculator, _yCoordinateCalculator);
    }

    /// <summary>
    /// Returns an enumerator that iterates through a collection.
    /// </summary>
    /// <returns>
    /// An <see cref="T:System.Collections.IEnumerator" /> object that can be used to iterate through the collection.
    /// </returns>
    IEnumerator IEnumerable.GetEnumerator()
    {
        return GetEnumerator();
    }
}

However, when I try to do the following:

linesEnumerable = linesEnumerable.Concat(new[] { new Point(viewportWidth, lastYCoordinate) });

it says ‘System.Collections.IEnumerable’ does not contain a definition for ‘Concat’ and the best extension method overload ‘System.Linq.Queryable.Concat(System.Linq.IQueryable, System.Collections.Generic.IEnumerable)’ has some invalid arguments

I already have System.Linq and Collections namespace added

using System;
using System.Data;
using System.Linq;
using System.ComponentModel;
using System.Collections;
using System.Collections.Generic;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Abt.Controls.SciChart;
using Abt.Controls.SciChart.Model.DataSeries;
using Abt.Controls.SciChart.Utility;
using Abt.Controls.SciChart.Visuals;
using Abt.Controls.SciChart.Visuals.Axes;
using Abt.Controls.SciChart.Visuals.RenderableSeries;
using System.Globalization;
using System.Windows.Data;
using Abt.Controls.SciChart.Rendering.Common;
using Abt.Controls.SciChart.Numerics.CoordinateCalculators;

What’s going on here? Can you improve your sample?

Thanks!

  • Azrin Sani asked 9 years ago
  • last active 9 years ago
Showing 101 - 150 of 4k results