Hi!
I would like to add a margin to the x-axis number so that they don’t stick on the axis anymore. See attached screenshot for detailed explanation.
Is that possible?
Best regards,
Joerg
- Joerg Hoehn asked 11 years ago
Hi Guys
We’re adding legends to out charts and would prefer to have horizontal legends rather than vertical ones. We are using data templates for the charts requiring the use of styles for the change rather than doing it programatically.
I had a look at the forum topics on the subject and set up a style with a horizontal stack panel like this
<Style x:Key="LegendStyle" TargetType="{x:Type visuals:SciChartLegend}"> <Setter Property="BorderBrush" Value="White" /> <Setter Property="BorderThickness" Value="0" /> <Setter Property="Background" Value="{DynamicResource ComponentColor}" /> <Setter Property="VerticalAlignment" Value="Top" /> <Setter Property="HorizontalAlignment" Value="Left" /> <Setter Property="Padding" Value="5" /> <Setter Property="FontSize" Value="12" /> <Setter Property="Foreground" Value="Black" /> <Setter Property="FontWeight" Value="Bold" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type visuals:SciChartLegend}"> <Border x:Name="PART_Border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" HorizontalAlignment="{TemplateBinding HorizontalAlignment}" Padding="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalAlignment}"> <ScrollViewer VerticalScrollBarVisibility="Auto"> <ItemsControl x:Name="PART_LegendItems" BorderThickness="0"> <ItemsControl.ItemsPanel> <ItemsPanelTemplate> <StackPanel Orientation="Horizontal" /> </ItemsPanelTemplate> </ItemsControl.ItemsPanel> <ItemsControl.ItemTemplate> <DataTemplate> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="Auto" /> </Grid.ColumnDefinitions> <CheckBox Grid.Column="0" HorizontalAlignment="Left" IsChecked="{Binding IsVisible, Mode=TwoWay}" VerticalAlignment="Center" Width="16"> <CheckBox.Visibility> <Binding ElementName="PART_LegendItems" Path="DataContext.ShowVisibilityCheckboxes"> <Binding.Converter> <visuals:BooleanToVisibilityConverter /> </Binding.Converter> </Binding> </CheckBox.Visibility> </CheckBox> <Rectangle Grid.Column="1" HorizontalAlignment="Left" Height="10" Margin="5,0,20,0" VerticalAlignment="Center" Width="10"> <Rectangle.Fill> <Binding Path="SeriesColor"> <Binding.Converter> <visuals:ColorToBrushConverter /> </Binding.Converter> </Binding> </Rectangle.Fill> </Rectangle> <TextBlock Grid.Column="2" HorizontalAlignment="Center" Text="{Binding SeriesName}" /> </Grid> </DataTemplate> </ItemsControl.ItemTemplate> </ItemsControl> </ScrollViewer> </Border> </ControlTemplate> </Setter.Value> </Setter> </Style>
With this chart data template
<DataTemplate x:Key="ChartTemplate"> <Grid Margin="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Height="Auto"> <Grid.RowDefinitions> <RowDefinition /> <RowDefinition Height="Auto" /> <RowDefinition Height="Auto" /> </Grid.RowDefinitions> <visuals:SciChartSurface Grid.Row="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Height="400" x:Name="PriceChart" SeriesSource="{Binding Path=PriceChartAndOverlaySeries}" visuals:ThemeManager.Theme="BlackSteel" visuals:SciChartGroup.VerticalChartGroup="{Binding VerticalGroupID}"> <visuals:SciChartSurface.XAxis> <visuals:CategoryDateTimeAxis DrawMajorBands="True" DrawMajorGridLines="True" DrawMinorGridLines="False" DrawMinorTicks="False" DrawMajorTicks="True" GrowBy="0.0, 0.1" LabelFormatter="{Binding ChartAxisLabelFormatter}" VisibleRange="{Binding Path=DataContext.SharedXVisibleRange, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ItemsControl}}, Mode=TwoWay}" DrawLabels="True" /> </visuals:SciChartSurface.XAxis> <visuals:SciChartSurface.YAxis> <visuals:NumericAxis DrawLabels="True" DrawMajorBands="False" DrawMajorGridLines="True" DrawMinorGridLines="False" DrawMajorTicks="True" AutoRange="Always" GrowBy="0.1, 0.1" /> </visuals:SciChartSurface.YAxis> <visuals:SciChartSurface.Annotations> <visuals:TextAnnotation CoordinateMode="Relative" AnnotationCanvas="BelowChart" FontSize="72" FontWeight="Bold" FontFamily="/Architect.Modules.Surfaces;component/Fonts/#Helvetica Neue LT Com" Foreground="#22AAAAAA" Text="{Binding InstrumentName}" HorizontalAnchorPoint="Center" VerticalAnchorPoint="Center" X1="0.5" Y1="0.5" /> </visuals:SciChartSurface.Annotations> <visuals:SciChartSurface.ChartModifier> <visuals:ModifierGroup visuals:MouseManager.MouseEventGroup="{Binding MouseGroupID}"> <visuals:RolloverModifier IsEnabled="{Binding Path=Data.ChartModifier, Source={StaticResource BindingProxy}, Converter={StaticResource IsModifierTypeConverter}, ConverterParameter=Rollover, Mode=TwoWay }" ReceiveHandledEvents="True" /> <visuals:ZoomPanModifier IsEnabled="{Binding Path=Data.ChartModifier,Source={StaticResource BindingProxy}, Converter={StaticResource IsModifierTypeConverter}, ConverterParameter=ZoomPan , Mode=TwoWay }" XyDirection="XDirection" ReceiveHandledEvents="True" /> <visuals:CursorModifier IsEnabled="{Binding Path=Data.ChartModifier,Source={StaticResource BindingProxy}, Converter={StaticResource IsModifierTypeConverter}, ConverterParameter=CrosshairsCursor, Mode=TwoWay }" ReceiveHandledEvents="True" ShowAxisLabels="True" ShowTooltip="False" /> <visuals:RubberBandXyZoomModifier IsEnabled="{Binding Path=Data.ChartModifier,Source={StaticResource BindingProxy}, Converter={StaticResource IsModifierTypeConverter}, ConverterParameter=RubberBandZoom, Mode=TwoWay }" IsXAxisOnly="True" IsAnimated="True" ReceiveHandledEvents="True" /> <visuals:ZoomExtentsModifier ExecuteOn="MouseDoubleClick" /> <visuals:LegendModifier x:Name="LegendModifier" GetLegendDataFor="AllSeries" /> </visuals:ModifierGroup> </visuals:SciChartSurface.ChartModifier> </visuals:SciChartSurface> <visuals:SciChartLegend x:Name="ChartLegend" Grid.Row="0" LegendData="{Binding LegendData, ElementName=LegendModifier, Mode=OneWay}" ShowVisibilityCheckboxes="False" Style="{StaticResource LegendStyle}" /> <uiServices:GridExpander Grid.Row="1" Margin="0" BorderBrush="#FF1f282d" Height="10" Background="#FF1f282d" HorizontalAlignment="Stretch" VerticalAlignment="Center" IsCollapsed="False" IsTabStop="False" Direction="Next" IsAnimated="False" ExpanderRowHeight="{Binding ExpanderRowHeight}" /> <ItemsControl x:Name="IndicatorsContainer" Margin="0" Background="Aqua" ItemsSource="{Binding Path=IndicatorCollection}" ItemTemplate="{StaticResource IndicatorTemplate}" Grid.Row="2"> <ItemsControl.ItemsPanel> <ItemsPanelTemplate> <StackPanel Orientation="Vertical"> <i:Interaction.Behaviors> <ei:FluidMoveBehavior AppliesTo="Children" Duration="0:0:0.3"> <ei:FluidMoveBehavior.EaseY> <BackEase EasingMode="EaseOut" Amplitude="0.19" /> </ei:FluidMoveBehavior.EaseY> </ei:FluidMoveBehavior> </i:Interaction.Behaviors> </StackPanel> </ItemsPanelTemplate> </ItemsControl.ItemsPanel> </ItemsControl> </Grid> </DataTemplate>
Unfortunately the style does not seem to get applied to the legend. Even without the new stackpanel the style is not applied. Without the Style setting in the Legend the legend appears normally but vertically oriented of course.
Any thoughts as to the issue?
Thanks in advance
Regards
Ian
- Ian Carson asked 9 years ago
Hi,
Could anyone explain me what’s that about these errors?
‘Mocks_SciChart_Charting_Visuals_SciChartOverview_0_166924839_8_24014362’ TargetType does not match type of element ‘SciChart_Charting_Visuals_SciChartOverview_0_166924839’
The value “Spectrium.Chart.Modifiers.Spectrogram.SpectrogramSelectionModifier” is not of type “Mocks.SciChart_Charting_ChartModifiers_IChartModifier_0_166924839” and cannot be used in this generic collection.
The first one is caused by
<LinearGradientBrush x:Key="MountainAreaBrush" StartPoint="0,0" EndPoint="0,1">
<GradientStop Offset="0" Color="#33006400" />
<GradientStop Offset="1" Color="#E5006400" />
</LinearGradientBrush>
<Style x:Key="OverviewScrollbarStyle" TargetType="s:SciChartScrollbar">
all setters are omited for brevity
</Style>
<Style x:Key="OverviewStyle" TargetType="s:SciChartOverview"> <-- this style cause an error
<Setter Property="Fill" Value="{StaticResource MountainAreaBrush}"/>
<Setter Property="ScrollbarStyle" Value="{StaticResource OverviewScrollbarStyle}"/>
<Setter Property="Stroke" Value="#FF279B27"/>
</Style>
The second by
<s:SciChartSurface.ChartModifier>
<s:ModifierGroup s:MouseManager.MouseEventGroup="CustomGroup">
<m:SpectrogramSelectionModifier/>
</s:ModifierGroup>
</s:SciChartSurface.ChartModifier>
Of course “m” namespace is defined.
After building all these errors disappear but just right after I click on .xml file int the solution explorer the errors are shown again.
Best regards
Mark
- Marek Sienczak asked 7 years ago
- last active 7 years ago
Hello again!
I’m using new SciChart 3.2 Beta version. In the 3.1 version I had this code snippet to draw (only one) point marker:
protected override void DrawInternal(IRenderContext2D context, IEnumerable<Point> centers, IPen2D pen, IBrush2D brush)
{
var viewportRect = new Rect(new Point(0, 0), context.ViewportSize);
float width = (float)Width;
float height = (float)Height;
Point lastPoint = new Point();
var custBrush = context.CreateBrush(new SolidColorBrush(Colors.White));
foreach (var center in centers)
{
if (IsInBounds(center, width, height, viewportRect))
{
lastPoint=new Point(center.X,center.Y);
}
}
context.FillRectangle(custBrush, new Point(lastPoint.X - 100, lastPoint.Y), new Point(lastPoint.X - 100 + NameToDisplay.Length * 4 * (FontSize / 8.0), lastPoint.Y + 20 * (FontSize / 8.0)), 0);
context.DrawText(new Rect(lastPoint.X - 100, lastPoint.Y, NameToDisplay.Length * 4 * (FontSize / 8.0), 20 * (FontSize / 8.0)), FontColor, FontSize, NameToDisplay);
custBrush.Dispose();
}
But in new version all point markers are drawn only with this method :
protected override void DrawInternal(IRenderContext2D context, double x, double y, IPen2D pen, IBrush2D brush)
{....
How can I switch it to draw only by the method with centers (not with single point) , because I need to show only last visible point of renderable series ?
Thanks in advance!
- Egor asked 8 years ago
- last active 8 years ago
I’m developing an application where I need to generate a series of small chart “thumbnails” in a window. When the user clicks one, an equivalent full size chart is displayed in a separate window. There are several different types of chart (different data, interactivity, etc).
The thumbnail charts are quite small and have minimal formatting (e.g. no axis titles, grid lines, and so on), while the full size charts have more visual elements, and interactive functionality including modifiers, context menus, and other mouse event handlers. For this reason I’ve been using separate XAML for each chart’s thumb and full size version, but having two versions for each chart is becoming a maintenance issue as new chart types are added.
Certain elements are pretty similar between the two – particularly the and the (and YAxis), and I was wondering if there was a way to make these into resources, or if you can suggest some other way to achieve what I’m trying to do (i.e. XAML re-usability!).
I tried creating a resource dictionary with a style targeting “SciChartSurface”, then adding a setter for “RenderableSeries”, but it doesn’t like that as it’s an ObservableCollection.
- andyste1 asked 10 years ago
Hi there,
In the application we are developing, a user has the ability to add his/her own text annotation to the chart. Its simply done on the code behind, as its not persisted, so its really simple.
The code we use to add the user text annotation is:
private void AddTextAnnotationExecute(object obj)
{
var yValue = YAxis.HitTest(MousePoint);
var xValue = XAxis.HitTest(MousePoint);
var textAnnotation = new TextAnnotation
{
CanEditText = true,
IsEditable = true,
IsEnabled = true,
Text = xValue.DataValue.ToString(),
X1 = xValue.DataValue,
Y1 = yValue.DataValue,
YAxisId = YAxis.Id,
Uid = Guid.NewGuid().ToString(),
};
_sciChartSurface.Annotations.Add(textAnnotation);
foreach (var annotation in _sciChartSurface.Annotations.Cast<AnnotationBase>().Where(c => !string.IsNullOrEmpty(c.Uid)))
{
annotation.IsEditable = true;
}
_customAnnotationCollectionList.Add(textAnnotation);
}
This is the style we apply to the text annotation:
<Style TargetType="sciChart:TextAnnotation">
<Setter Property="BorderBrush" Value="Gray"/>
<Setter Property="Background" Value="White"/>
<Setter Property="Foreground" Value="Black"/>
<Setter Property="FontFamily" Value="Segoe UI"/>
<Setter Property="FontSize" Value="12"/>
<Setter Property="AnnotationCanvas" Value="AboveChart"/>
</Style>
So as you can see its pretty straight forward, but this is where is gets weird, this functionality works perfectly on computers on which Visual Studio is installed on, but on other computers, the text annotation is selectable and moveable, but no amount of double clicking enables the annotation for editing. I tried forcing the textbox IsEnabled=”True”, but to no avail.
Any suggestions?
Thanks in advance
- Charl Rhyn asked 7 years ago
- last active 7 years ago
Basically i have two data sets (Y1,X) and (Y2,X) i will like to display them one over the other like in the attached picture. Also when i add cursor to one of them it should move the cursor on the other graph as well. Also the zoom on one of the graph should reflect the same way on the other graph.
Right now i am doing this with two sci chart surface, (no cursor linkage). which examples should i look at for this?
- manish Bhardwaj asked 9 years ago
- last active 9 years ago
Hi,
I would like to be able to mimic the MouseWheelZoomModifier behavior programatically.
I have a slider control that I would like to zoom into the map. The same as the mouse wheel delta changes. I have a chart that has multiple Yaxis bound to the YAxes property of the SciChartSurface.
The mousewheezoommodifier works correctly, I just don’t know how to access the same functionality.
Thanks,
- Martin Long asked 9 years ago
I am trying to create a custom CursorModifier Tooltip. It works in that it shows both of my lines on the screen and all the data associated with the lines. But what I would like to do is only report information about the first line, as the second line is only there for visual purposes as default. Here is a sample of my code.
<ItemsControl Margin="6" ItemsSource="{Binding SeriesData.SeriesInfo}"> <ItemsControl.ItemTemplate> <DataTemplate> <StackPanel Orientation="Vertical"> <StackPanel Orientation ="Horizontal"> <TextBlock Style="{StaticResource HintDataItemsStyle}" Text="Available Imports:"></TextBlock> <TextBlock Style="{StaticResource HintDataItemsStyle}" Text="{Binding Value, StringFormat=\{0:###\,##0\}}" /> </StackPanel> </StackPanel> </DataTemplate> </ItemsControl.ItemTemplate> </ItemsControl>
What I’ve tried to do is change the ItemsSource to SeriesData.SeriesInfo[0] which seems to get only the line I want, but then the Value bindings below no longer work.
- Kohins asked 10 years ago
Hi All,
Can I add YAxis as DateTimeAxis and XAxis as NumericAxis?
Thanks,
Arthur
- Arthur Romanov asked 10 years ago
I would like to define two FastHeatMapRenderableSeries.ColorMap s. One in black and white for printing and the other one, … Why not just for the fun of it :D. How would I be able to switch between ColorMaps ( preferably through binding ) in wpf?
- Michel Moe asked 8 years ago
- last active 8 years ago
Hi,
Is possible in SciChart to plot just points in the chart, with no line connecting the points?
- Irene Aquino asked 7 years ago
- last active 7 years ago
Hi,
I’m trying to set the text format for a date time axis without success, the labels always show time only like hh:mm, no matter what is the textformat string or the zoom level.
Tried with “dd-MMM-yyy hh:mm”, “dd-MMM”, “g”.
Appreciate you help on this.
Thanks
- jsimoes asked 10 years ago
Hi everyone,
I have the column chart as the image below. However, they overlap each other when I don’t set the DataWidthPoint.
If I set the DataWidthPoint = 0.2 the chart is ok but in another circumstance the width column is quite small.
Are there any way to add some spacing between columns in FastColumnRenderableSeries .
Thanks.
- Quan Tran asked 7 years ago
- last active 7 years ago
When a series has many, many points, the rollover does not go all the way to the first or last point. This isn’t a huge deal but I would expect as a user to be able to drag to the full extents of the chart. Any workaround for this? I can set GrowBy to provide some padding but then the rollover can be dragged beyond the data points, which I definitely don’t want (if there is a way to limit the rollover to not do that then that would be ok).
- David Adams asked 8 years ago
- last active 8 years ago
Hi,
in a MVVM scenario, I bind the AnimatedVisibleRange to a property in the view model.
<s:SciChartSurface SeriesSource="{Binding ChartSeries}">
<s:SciChartSurface.XAxis>
<s:NumericAxis AxisTitle="x" AnimatedVisibleRange="{Binding XVisibleRange, Mode=TwoWay}" AutoRange="Never" />
</s:SciChartSurface.XAxis>
<s:SciChartSurface.YAxis>
<s:NumericAxis AxisTitle="y" AnimatedVisibleRange="{Binding YVisibleRange, Mode=TwoWay}" AutoRange="Never" />
</s:SciChartSurface.YAxis>
<s:SciChartSurface.ChartModifier>
<s:ModifierGroup>
<s:MouseWheelZoomModifier IsEnabled="True" XyDirection="XDirection"/>
</s:ModifierGroup>
</s:SciChartSurface.ChartModifier>
</s:SciChartSurface>
Setting the XVisibleRange property in the view model smoothly animates the view. However, when I zoom in the chart with the mouse wheel, the view model property receives no updates (so the XVisibleRange property in the view model always stays on the value initially set by the view model).
The same thing works when I bind he VisibleRange instead of the AnimatedVisibleRange, i.e. in that case I get an update of the view model property on every mouse wheel zoom.
Is this intendend, or a bug? Building a workaround would require additional bindings, which I would like to avoid.
Best regards,
Andree
- Andree Grosse asked 8 years ago
- last active 8 years ago
Hello,
I have a scichart and bound to its VM class. Inside this VM there is a Highlights property.
On the MainWindow, I am placing two of this charts with their own VM instance.
The problem is that when the Annotations is bound, it is only drawn on the last chart as shown in the image.
If I manually code in xaml the annotations (no binding) then the annotations are drawn in both charts.
How can I make it work with the binding?
Thanks
- Miguel Hau asked 9 years ago
- last active 9 years ago
Check out the following blog post showcasing the upcoming features in SciChart v1.5!
The release date is “Q4” – we anticipate being ready for full release by end Oct / early November. Contact us if you’re interested in any of the new features and want a beta version!
- SciChart asked 10 years ago
Hello,
I’ve noticed huge performance decline in IRenderableSeries.HitTest function in the latest 2.3 version compared to version 2.1.1.
For chart with 1.5mln points calling this function is now about 1000 times slower then in earlier version (from ~40 tics to ~40000). I can provide some sample code if required.
- anth asked 9 years ago
Hello!
Is there any method to paint FastBandRenderableSeries using some image like template? (see the picture below)
Thanks in advance
- Egor asked 7 years ago
- last active 7 years ago
Hi All,
i did the Zoom X with this code:
private void ZoomExtentsX_Checked(object sender, RoutedEventArgs e)
{
if (rubberBandZoomModifier != null)
{
var checkBox = (CheckBox)sender;
rubberBandZoomModifier.IsXAxisOnly = checkBox.IsChecked == true;
}
}
also i make the code for Zoomping in Y Axis by this code :
private void ZoomExtentsY_Checked(object sender, RoutedEventArgs e)
{
if (rubberBandZoomModifier != null)
{
var checkBox = (CheckBox)sender;
rubberBandZoomModifier.ZoomExtentsY = checkBox.IsChecked == true;
}
}
the zoomX run good but for the Y Axis it’s not ok because the code zoom x and y in the same time (like picture) !! anybody have idea ? Thank you !
- sahar Les asked 8 years ago
- last active 8 years ago
I’d like to be able to hide the line in the FastLineRenderableSeries so only the markers show. I’ve tried setting the width to 0, but that throws exceptions as it can’t handle 0. Currently, I am setting the brush to Transparent so it is invisible, but I suspect there is still some processing related to drawing going on.
Is it possible to allow a width of 0, which just skips the drawing logic completely for the line and move on to markers?
- Mike Melancon asked 10 years ago
I have a ListBox containing ListBoxItems that are UserControls containing a SciChartSurface.
My user needs to be able to select an item in the ListBox. I find that if you click on the SciChartSurface, the item does not get selected. I had to click outside the SciChartSurface to select the ListBoxItem.
Is there an easy way to make SciChartSurface not consume the mouse event? The user will not be manipulating anything in the SciChartSurface so there is no need for it to handle any mouse events.
Thank you.
- Kwokon Ng asked 7 years ago
- last active 7 years ago
I have some text items which are bound to the “DataValue” members of CursorModifier’s “AxisInfo”. These work just fine most of the time. But after enabling and then disabling a particular mode in my program which involves a customized version of RubberbandXyZoomModifier, the X-axis data in AxisInfo no longer responds to my cursor position. Curiously, the Y-axis data continues to work fine.
I’m still using SciChart version 2.3 (I haven’t upgraded to 3.x yet). Is there a chance what I’m seeing is a bug in SciChart? I can’t find anything in my code which could cause this behavior, at least not yet…
Thanks,
–George
- yefchak asked 9 years ago
- last active 9 years ago
Got a feature request from my customer. He would like to be able to set the stroke thickness to less than 1 to be able to get a more detailed view. Any chance that could be possible?
- Lisbeth Skogland asked 9 years ago
Hi guys!
I have a bit of a challenge with annotations. I am running an mvvm application in which you can create annotations dynamically. I can’t seem to get a grip on how to manage these in a good way. My current “workaround” is to handle onAnnotationCreated and use that to add an object to my viewmodel. But then, as my underlying data changes the chart gets redrawn so I need to handle a load event on the scichart and then redraw them based on the information in my view model. Any thoughts on a better way to solve this?
However now the story gets even more interesting. I need to give my users the option of changing color, stroke and such on these annotations. How could I do this? And then how would I manage to keep my viewmodel updated with these changes?
- Lisbeth Skogland asked 10 years ago
For some reason SciChart cannot render two VerticalLineAnnotation bound to to the viewmodel.
I have the following xaml
<sciChart:SciChartSurface.Annotations> <sciChart:VerticalLineAnnotation VerticalAlignment="Stretch" FontSize="12" FontWeight="Bold" ShowLabel="True" Stroke="Orange" StrokeThickness="2" X1="{Binding Data.Region.Right}"/> <sciChart:VerticalLineAnnotation VerticalAlignment="Stretch" FontSize="12" FontWeight="Bold" ShowLabel="True" Stroke="Orange" StrokeThickness="2" X1="{Binding Data.Region.Left}"/> </sciChart:SciChartSurface.Annotations>
When I place hardcoded values it works. And the first of the vertical line annotation always gets rendered correctly. Seems like a bug to me.
- nitroxn asked 10 years ago
Hello.
I am using a FastLineRenderableSeries with XAxis as TimeSpan and YAxis as double values, updating at a very fast rate.
My question is what is the proper way to add another series as the envelope detection of the FastLineRenderableSeries.
Any suggestions or tips would be appreciated. Thank you.
- Roy Ben Shabat asked 8 years ago
- last active 8 years ago
Hi,
I’d rather have one tooltips for all my series like a legend.
But I want this special legend to be placed on the first (main) series tooltip coordinates.
I understand using a rollover is the best way to do it.
- Nicolas Vitale asked 7 years ago
- last active 7 years ago
Hi guys,
Related with my previous question: how do I add the anottation lines to the chart legend? It seems it only gives me options about the data series, nothing else…
Thanks
- jsimoes asked 10 years ago
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
- Andrew Burnett-Thompson asked 8 years ago
- last active 8 years ago
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 8 years ago
- last active 8 years ago
I’ve been asked to design a UI that will act rather like some image viewers that you see on the web these days – we want to display a list of small chart “thumbnails” (with horizontal scrolling), and when one is clicked have it display at a larger size. Worst case scenario I see there being a dozen charts, each with varying complexity (a single series with a few points, up to several series/hundreds of points and maybe a couple of custom modifiers too).
These charts will be generated each time the user clicks on a cell in a datagrid (elsewhere in the window), so performance may or may not be an issue (although it could of course be done on a background thread).
Should I just be able to render and add all these charts to the ItemsControl (or whatever I use for the scrolling) or will performance suffer having many charts on screen at once? Would there be any benefit to rendering the charts to bitmaps, and using these as the thumbnails (I guess there would be more overhead in doing this)? I suspect the answer may be “try it and see”, but wanted to run it by you first.
Thanks in advance
Andy
- andyste1 asked 10 years ago
I am showing tooltip with CursorModifier. My tooltip bigger than SciChartSurface and I am using ClipModifierSurface=”False” in order to show whole tooltip. But in this case axis labels and scroll bar are on top of tooltip.
Described problem can be seen on Featured Apps > Scientific Charts > Oscilloscope Demo.
Is there any way to bring tooltip on top of chart surface?
Thanks
Samvel
- Samvel Siradeghyan asked 7 years ago
- last active 7 years ago
My MVVM application can display more than 300 FastLineRenderableSeries on a SciChartSurface. SciChart handles the data and redisplays quite well. Thank you!
My users may mouse click on a series and quickly see the SelectedSeriesStyle change. The application needs to access the SeriesName of the SelectedSeries in the ViewModel for updates to other items in the ViewModel.
I read the topic/posts tagged SelectionSeriesModifier MVVM and the SeriesSource API. My attempts to utilize the CollectionChanged event of SelectedRenderableSeries (not in code-behind) have not had any success. It seems that I should do a OneWayToSource binding from SelectedRenderableSeries to an ObservableCollection<IChartSeriesViewModel> in the ViewModel. I would then like to use an MVVM Light EventToCommand bound to the CollectionChanged event.
Can you provide a demo or workaround on how to actually make this work?
- LyleDanielson asked 9 years ago
Hi,
I think I found a bug. I tried to make example as simple as possible (see attached project).
Exception (Object must be of type of the type of series) is thrown if I select the series line (1) and then clicking few times on the area of the graph (2). It seems to be more sensitive in the area “under” the graph.
It seems that it happens only if I use SeriesSelectionModifier.
FastMountainRenderableSeries seems to be more sensitive to this error than LineRenderableSeries.
Thanks
Jan
- Jan Kaiser asked 8 years ago
A while back in another thread, Yuriy mentioned a way to handle multiple annotation types was to have separate collections of annotations of different types and they all would be merged in one CompositeCollection which can be bound to ModifierGroup.ChildModifiers property.
Can you show me an example of how to do that?
thanks!
- tecman234 asked 9 years ago
Hi
We are using a simple SciChart setup like the following:
<Grid Margin="20,45,50,20">
<!-- Create the chart surface -->
<s:SciChartSurface Name="SparseValuesPlot" s:ThemeManager.Theme="Chrome">
<!-- Declare RenderableSeries -->
<s:SciChartSurface.RenderableSeries>
<s:FastLineRenderableSeries DataSeries="{Binding Values}" Style="{Binding PlotStyle, Converter={StaticResource plotStyleConverter}}" />
</s:SciChartSurface.RenderableSeries>
<!-- Create an X Axis -->
<s:SciChartSurface.XAxis>
<s:NumericAxis AxisAlignment="Bottom" GrowBy="0.1, 0.1" AxisTitle="{Binding XAxisTitle}" AutoRange="Never" VisibleRange="{Binding XRange}" />
</s:SciChartSurface.XAxis>
<!-- Create a Y Axis -->
<s:SciChartSurface.YAxis>
<s:NumericAxis AxisAlignment="Left" GrowBy="0.1, 0.1" AxisTitle="{Binding YAxisTitle}" AutoRange="Never" VisibleRange="{Binding YRange}" />
</s:SciChartSurface.YAxis>
</s:SciChartSurface>
</Grid>
Is there a way to fix the aspect ratio of the chart such that a unit on the x-axis is displayed with the same number of pixels than a unit on the y-axis?
Right now the chart is streched with the surrounding grid. I tried to set height and width of the SciChartSurface but this does not keep the relations because the axis label areas may take different amount of space.
Thanks
Julian
- Julian Heeb asked 7 years ago
- last active 5 years ago
Here is XAML code which works:
<!-- Defines the renderable series. Each series may be styled -->
<visuals:SciChartSurface.RenderableSeries>
<visuals:FastLineRenderableSeries SeriesColor="Red" DataSeries="{Binding Measured1StPointsSeries}" IsVisible="{Binding Is1StMeasured}">
</visuals:FastLineRenderableSeries>
<visuals:FastLineRenderableSeries SeriesColor="Green" DataSeries="{Binding Measured2NdPointsSeries}" IsVisible="{Binding Is2NdMeasured}">
</visuals:FastLineRenderableSeries>
<visuals:FastLineRenderableSeries SeriesColor="Blue" DataSeries="{Binding Measured3RdPointsSeries}" IsVisible="{Binding Is3RdMeasured}">
</visuals:FastLineRenderableSeries>
</visuals:SciChartSurface.RenderableSeries>
<!-- Defines the XAxis, using an explicit VisibleRange -->
<visuals:SciChartSurface.XAxis >
<visuals:NumericAxis AxisTitle="RA Pump Current, A" DrawMajorTicks="True" FontSize="30" TitleFontSize="35" Orientation="Horizontal" MajorDelta="5" MinorDelta="1" AutoTicks="True" AutoRange="Always" VisibleRange="{Binding PowerXRange}">
</visuals:NumericAxis>
</visuals:SciChartSurface.XAxis>
<!-- Defines the YAxis -->
<visuals:SciChartSurface.YAxis>
<visuals:NumericAxis AxisAlignment="Left" FontSize="30" TitleFontSize="35" AxisTitle="Power, W" MajorDelta="0.2" MinorDelta="0.1" AutoTicks="False" AutoRange="Always" VisibleRange="{Binding PowerYRange}"/>
</visuals:SciChartSurface.YAxis>
<!-- Declare ChartModifiers -->
<visuals:SciChartSurface.ChartModifier>
<visuals:LegendModifier x:Name="PowerLegendModifier" Background="White" GetLegendDataFor="AllVisibleSeries"/>
</visuals:SciChartSurface.ChartModifier>
</visuals:SciChartSurface>
<visuals:SciChartLegend x:Name="PowerChartLegend" Foreground="Black" FontSize="28" Background="White" LegendData="{Binding LegendData, ElementName=PowerLegendModifier, Mode=OneWay}" Margin="125,23,0,0" />
But I tried to create chart programaticall to render it in memory and export to bitmap, but I can not add legend:
//Scichart thing
var series1St = new FastLineRenderableSeries() {
SeriesColor = Colors.Red,
DataSeries = Measured1StPointsSeries,
IsVisible = Is1StMeasured
};
var series2Nd = new FastLineRenderableSeries() {
SeriesColor = Colors.Green,
DataSeries = Measured2NdPointsSeries
};
var series3Rd = new FastLineRenderableSeries() {
SeriesColor = Colors.Blue,
DataSeries = Measured3RdPointsSeries
};
var xAxes = new AxisCollection() { new NumericAxis() };
var yAxes = new AxisCollection() { new NumericAxis() };
//var powerLegendModifier = new LegendModifier() {
// Background = Brushes.White,
// GetLegendDataFor = SourceMode.AllVisibleSeries
//};
var surface = new SciChartSurface() {
//ChartTitle = "Rendered In Memory",
XAxes = xAxes,
YAxes = yAxes,
RenderableSeries = new ObservableCollection<IRenderableSeries>() { series1St, series2Nd, series3Rd },
ChartModifier = new LegendModifier() {
Background = Brushes.White,
GetLegendDataFor = SourceMode.AllVisibleSeries
}
};
Seems like SourceMode.AllVisibleSeries to be the culprit – tries to update non existing data. How could I have chart modifier added with c# direct code?
- justas.bukys asked 8 years ago
- last active 8 years ago
Could you please post GridLinesPanelStyle from BlackSteel theme? I’ve overriden the style to remove border, and now it has default background, which isn’t in line with other elements.
- gman asked 10 years ago
- last active 6 months ago
Hi i am new to SCiChart and i was wondering if there is an option to double click on screen and make it full screen or maybe some sort of un-dock it or open it in new window full screen?
Thx
- iliya24@gmail.com asked 7 years ago
- last active 7 years ago
Hello,
i have a chart with one x axis and many y axes. What i try to archive is to draw a vertical rectangle over the chart in a specific x-interval but over full Y.
I guess annotations are the solution, i got them working (at least i see them on the chart), but i have questions:
Is it possible to add an annotation without a corresponding Y-Axis? I do not want to connect them to a YAxis since it does not make sense in that case. They should always occupy the full Y range. And, what are the correct Y1 / Y2 values? I tried Double.NegativeInfinity/Double.PositiveInfinity and Double.MinValue/Double.MaxValue but both crashed.
Many thanks,
Robin
- Andreas Mueller-Bluemlein asked 9 years ago
hi,
Guys i have a requirement to make a chart name volume by price please see the attachment image.
can we make this kind of charts .
Thanks in advance.
- vinay khandelwal asked 8 years ago
- last active 8 years ago
I’m not clear how you set up FIFO with the SciStockChart class and mvvm; docs are a little weak; all the examples seem to use datasets rather than ChartSeriesViewModel. Do I simply set the fifocapacity? Do I need to set it at instantiation? Do all the ChartSeriesViewModels in a collection need to have the same Fifocapacity? Can I change the fifocapacity at runtime; and if so how would I change the capacity of all of the ChartSeriesViewModels (assuming they must all be the same) in a collection?
thanks in advance.
- riverTrader asked 10 years ago
Hi sciChart,
I create a custom annotation base type BoxAnnotation.
<s:BoxAnnotation x:Class="ChartComponent.Annotations.TowLines"
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">
</s:BoxAnnotation>
I use style
<Style BasedOn="{StaticResource AnnotationBaseStyle}" TargetType="Annotations:TowLines">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="s:BoxAnnotation">
<Border x:Name="PART_BoxAnnotationRoot"
Margin="{TemplateBinding Margin}"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="{TemplateBinding CornerRadius}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="2"/>
<RowDefinition Height=""/>
<RowDefinition Height="2"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width=""/>
</Grid.ColumnDefinitions>
<s:HorizontalLineAnnotation Grid.Row="0" Grid.Column="0" VerticalContentAlignment="Top" Stroke="Blue" Margin="0,0,50,0" StrokeThickness="2">
<s:AnnotationLabel LabelPlacement="Right" FontSize="10" Foreground="White"/>
</s:HorizontalLineAnnotation>
<s:HorizontalLineAnnotation Grid.Row="2" Grid.Column="0" VerticalContentAlignment="Bottom" Stroke="Red" Margin="0,0,50,0" StrokeThickness="2">
<s:AnnotationLabel LabelPlacement="Right" FontSize="10" Foreground="White"/>
</s:HorizontalLineAnnotation>
</Grid>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
The label of HorizontalLineAnnotation in custom annotation not show.
- shiwa asked 10 years ago
Hi,
I have a chart showing data sets composed of multiple renderable series. Each data set is displayed using one FastLineRenderableSeries and three XyScatterRenderableSeries. All four series show in the legend for each data set, but I would only like to show the FastLineRenderableSeries in the legend for each data set. How can I do this?
I’ve seen the legendModifier.GetLegendDataFor property, but that can only be set to show options from this enum
public enum SourceMode
{
AllSeries = 0,
AllVisibleSeries = 1,
SelectedSeries = 2,
UnselectedSeries = 3,
}
which aren’t what I need. Some kind of flag on the renderable series saying whether they should be shown in the legend, or some way to specify the items source for the legend would be good.
Thanks!
- Robert Evans asked 8 years ago
- last active 6 years ago
In the oil industry a well survey is usually displayed by a series of points connected by arcs. An arc is very close to the actual path a drill will take between points on a survey. Survey points are about 90 feet apart, so connecting them with a straight line looks ugly. Which method should I override to accomplish this?
If I get ambitious, I may also consider using Bezier curves to connect points, as this could be useful to represent geological boundaries as a background for my well survey plots.
I have attached a picture showing the type of plots I need to make. The red line is a survey and the background represents geological layers. The survey is presently connected with straight lines, which makes it difficult to determine precisely where the survey intercept the boundaries.
- Stephen Painchaud asked 8 years ago
- last active 8 years ago
I have four basic line charts that are next to a storyboard animation. Basically when I press run, I draw a vertical line through each chart that moves based on the elapsed time of the animation. The point is to show where in the time-axis the current animation frame is occurring.
I was using Windows.Controls.DataVisualization.Tookit but when drawing the four lines my animation would become choppy. I tried implementing with SciChart and find the performance is just as bad. Any tips? It was my understanding this would be a great improvement.
My approach is just to have two FastLineRenderableSeries per chart, and every time the animation traps in the Storyboard_CurrentTimeInvalidated, I clear the 2nd series(that only has 2 datapoints) and do a series.append at the coordinates of the line. If I disable the lines, it runs fine, and if I switch tabs on my application so the charts are hidden(but lines are still being drawn), it runs fine.
Thanks.
- mjt1987 asked 10 years ago
I am working on an application where I have multiple XY data series. For one of the series, we are producing annotation data for some of the points. There are 8 different types of annotations that can be created. Based on the response you gave to a previous question, I am creating the annotations as separate data series instead of as actual annotation objects since there are thousands of them. Performance starts to suffer as the number of annotations increases.
The issue I’m running into now is the number of series is now 14 which is unwieldy for displaying in a legend. My current legend is horizontally oriented as shown in the attached image. I would prefer that the user not have to scroll to view all of the legend items and am trying to figure out how to achieve that.
Is there a way to specify a fixed width for the legend and have items wrap to a new line if there is not enough room for them? I didn’t see that as being an option for the standard legend template.
Also, is there a way to use multiple legends for a chart? Ideally it would be nice to split the series that are associated with annotation data into their own legend instead of mixing them in with the legend for the normal data. The SeriesInfo object doesn’t appear to have any property that would allow me to categorize the data.
Thanks,
Scott
- sdamge asked 7 years ago
- last active 7 years ago
- Stuart McCullough asked 8 years ago
- last active 8 years ago