I've researched and can't seem to find if adding Data Labels to Dataviz charts is possible. I haven't seen an example that actually shows them. Is this something that is even possible ?
An example of adding a Y-axis label:
var datapoint = new Bunifu.DataViz.DataPoint(Bunifu.DataViz.BunifuDataViz._type.Bunifu_line);
datapoint.addLabely("SUN", r.Next(0, 100).ToString());
Related
I have been trying to create a graph in .net C# with the library: https://v0.lvcharts.com/
I have quite a few different series on my graph and all with different points per x value. As seen below this is the current tooltip on hover.
What i need is to only display the X value: 00:07 & the Series 'Measured Temperature'. I do not want to show any of these other series on my tooltip. If i use the SelectionMode.OnlySender it does not show the X value: 00:07 which is quite important since graphs can be over 24 hours long..... Because otherwise it would be quite tricky to find out at which time you are specifically looking...
Does anyone know how to only show 1 series with Y&X value? Not any other series...
The project is made in WinForms c# .NET
You need to change the IsVisible property in your element of graph collection:
SeriesCollection[i].IsVisible = false;
i - is the index of the element in the collection
If it looked like creating a pre-hidden element:
SeriesCollection = new SeriesCollection
{
new LineSeries
{
Title = "Series 1",
Values = new ChartValues<double> { 4, 6, 5, 2 ,4 }
IsVisible= false; // this one
}
};
Or is your goal to leave all the graphics in place, but only hide all the fields in the ToolTip except the one you hovered over?
I need an explanation about Infragistics, which I don't understand. I want to display several bars in a chart per month. The whole thing will be in my opinion a StackColumnChart:
But is displayed incorrectly.
If I run the whole thing as a ColumnChart they are displayed correctly:
Is it possible that I get the same display also in the StackColumnChart?
Actually your chart is configured to show data values on charted items. This is how the data is organized on the Stacked Column Chart. But this default behavior you can change according to your requirements.
Make the following changes.
I suppose you already have the Infragistics.UltraChart.Resources.Appearance.ChartTextAppearance chartTextAppearance1 declaration. If not you can add it by using the Chart Wizard.
The chartTextAppearance1 will added later to the column chart appearance like that:
columnChartAppearance1.ChartText.Add(chartTextAppearance1);
Set the chartTextAppearance1.ItemFormatString to <DATA_VALUE_ITEM>:
chartTextAppearance1.ItemFormatString = "<DATA_VALUE_ITEM>";
This make it work as you was asking.
Some additional information you can find here: Label Formatting
I have a DataGridView that displays information that is read from a txt file. My aim is to create a line graph for this data which displays DateTime for the X axis.
My aim is to create the graph so it shows the information from the Gridview onto the graph. The user can then select points on the graph that then show them specific info from that part of the data for example a row.
I am not sure which API to use for this:
I have tried using internal Chart functions for Visual Studio but I can not interact the selectable part onto the graphs I created.
If anyone has any advice on how to do this would be great.
Your question seems to have several parts. I'll try to help with each..
The last part in your question is solved like this:
Assuming you have a Chart with the DataPoints set and showing the line, you can use this:
Series S = chart1.Series[0]; // short reference
S.ToolTip = "#VALX{#.##}" + " : " + "#VALY1{#.##}";
to display the x- and y-values as tooltips in a format you like.
See MSDN for a full list of keywords to use in referring to the DataPoints
If you want to display data that are not part of the DataPoint's data you can instead create individual ToolTips for each DataPoint when you add it:
double dx = yourXValue;
double dy = yourYValue;
DataPoint dp = new DataPoint(dx, dy);
dp.ToolTip = yourToolTip;
S.Points.Add(dp);
You will have to create the ToolTip readily formatted for each DataPoint!
If other parts are still open, please say so!
I want to make a static column header in WPF datagrid, so the user will see the column headers/names, when scrolling down if table is too long.
However, I am really new to this WPF/C# thing, and I am no sure how to do it, and if it will be in cs part, or xaml part. I have searched many possible solutions, but most of them were for asp.net link or I found even nice HTML/CSS solution to this, or even some plugins to do so.
However, my question remains - how to make datagrid column header static, and should I do it in cs part or xaml part?
Thanks
Edit: as I am just fixing larger part of code, it would be too difficult to post it all. However, I read those problems with scrolviewer, and I found there this part of code, which might have caused it:
var scrollViewer = new ScrollViewer()
{
HorizontalScrollBarVisibility = ScrollBarVisibility.Auto,
VerticalScrollBarVisibility = ScrollBarVisibility.Auto
};
scrollViewer.AddHandler(UIElement.MouseWheelEvent, new RoutedEventHandler(this.MouseWheelHandler), true);
var stackPanel = new StackPanel();
scrollViewer.Content = stackPanel;
So - could this caused it, and do you have advice how to fix it? Thanks in advance
I am creating a word document(2010) using c#.
It consists of a large table weith cells and within the cells paragraphs.
I Have achieved this with a little with (i hope simple) a little niggly issue. In front of every piece of text there is a block of empty space.
I am attempting to get rid of this space with no luck.
To build the table I have pretty much followed this example.
http://msdn.microsoft.com/en-us/library/office/gg490656.aspx
I have tried fiddling with the sacing of the cells, of the table rows and of the table cells but i'm unsure if i am using the right properties.
I have tried appending new ContextualSpacing() { Val = false } to table row and cells with no luck. I've also tried new Spacing with no luck either!
Any ideas hints tips would be muchly appreciated
I found that setting the style to a style within word resolved the issue. This was a manual process and then i looked in to how to do this programatically.
DocumentFormat.OpenXml.Wordprocessing.TableStyle tableStyle2 = new DocumentFormat.OpenXml.Wordprocessing.TableStyle() { Val = "TableGrid" };
Append this item to the table and it all worked perfectly!