Remove the second row in x-axe of Chart - c#

I use WPF toolkit Chart control. How to remove the second row in x-axe of Chart?

It's not a second row, it's juste "space management" of labels. You must set another datetime format in order to let enough space for the rendering.

I working with Telerik RadChart and there you can rotate the labels, so if you use let's say an angle of 45, they will line up nicely without and overlap. Maybe it's possible to in your language? Try look for it, I would not be surprised if you could do the same.

Related

Creating a grid on the side of a control

Just recently started WPF and well into the run before I can walk stage.
I have made a custom control that I need for one of my projects, and it looks almost exactly as I want. It currently looks like this:
whereas I need to add a scale to the horizontal and vertical sides, with a mark and a number of how many cells we are at, skipping a predefined number which should look roughly like this:
The model that provides the data for the control has the data, the size of each cell (and thus the overall size), all the label text, and a step value for the X and Y control.
The control is a grid with the title in the top row, the y title, space for the numbers, the control in the second row and the space for the X control in the next and the title of the x axis in the last.
If I was doing windows forms I would just draw in manually and it would be pretty simple, but I would like to learn this properly.
After a lot of googling, I can't find a way of doing this easily in XAML, so I assume I have to do a custom control on a canvas, or is there an obvious way that my inexperience with WPF is missing?
There is nothing out to the box but there is a control you can work off of to get what you need. Investigate modifying the TickBar.
An initial search turned up How to use string values in place of ticks on WPF Tickbar?.

What should I use to display a "time table" in windows form?

I am working on an app to show sort of a time table.
Let's say I have a 2D array of items and I would like to display them in a 2D grid with both line and column headings (dayOfWeek x time).
I also need to be able to change background color of each cell depending on the contents (for example if the items name at position [x,y] is empty, I want to display cell at that position with red background.
What I can do is arrange a bunch of textboxes to form a table (because I have a fixed array size). However, this approach seems a bit too complicated and I could imagine there is some easier way to do this. ListView maybe?
So what I am asking is this: What is the best tool, or way in windows forms I should use for my problem? I am not looking for a finished solution, just a little tip / guidence. Thanks in advance!
You can use a ListView adding the columns with myListView.Columns.Add("whatever", width) and you can change the cell color with myListView.ForeColor = redColor. Being redColor a Color type.
The Windows.Forms Listview in details mode should be able to do what you want.

Alignment of text when column width is changed from GUI in winform application

I have developed a winform application. It has a listview with multiple columns having different texts. Initially, I have set the column width = -2 to take the size of longest text in the column.
The issue is that sometime text overshoots the laptop screen and a horizontal scroll bar appeared in the list view.
To fit all the columns in a screen, I manually modified the columns widths using column boundaries in the GUI. When I modify the column width, the column text starts disappearing from right. I want it to disappeared from left.
I have searched goggle a lot but did not find the answer.
Question might look weird or may be I have not explained it properly. Please let me know if more information is needed.
Thanks in advance.
The Listbox columns in Windows Forms are not exactly a high level control, I've used it some times but just for simple lists, It certainly has not a builtin function to make what you want, to obtain it you probably need to subclass the control, create a new class for the item managed in the list and write some code to perform what you need.
I think you can find some hints on how to achieve all this in Charles Petzold book about windows forms where he shows how to measure a string and how to draw directly on your control.

Chart Controls: Stacked Column Series Label Positioning

I am creating a stacked column graph but am currently limited by the lack of label positioning for each series. There are not any custom properties which relate to alignment of label positioning, is there some other way to offset labels or align them for stacked charts?
By creating a dummy series and manually setting each label value you can reposition a stacked columns labels to either the top or bottom of the stack. It is limited, and certainly not what I would like, but it is the best I have found so far.
While the control used is different the best example of the concept I have found is here:
total value of each column in a stacked column
Check out my blog post for more details and a better method of handling this:
http://jeremeguenther.blogspot.com/2015/02/overlapping-columns-in-microsoft-aspnet.html
last paragraph from the msdn : link
you might wanna check out the SmartLabelStyle altough I've never used it with column chart type. link

DevExpress Charts Question

Is it possible to create chart (as shown on screenshot) in DevExpress Chart control?
I have developed something similiar, already. I learned that it is better to use XtraGrid instead of the chart, as pattern matrix. The I used CustomCell drawing feature to draw colored bars according values in the cell.
Avoid DevExpress charts if you are rendering anything more than 100 data points. At least in v14 and v15, the charting controls are very, very slow compared to most things out there. Every time it redraws, you have to wait seconds for it to redraw.
This does not detract from how awesome the rest of DevExpress is (its my library of choice for everything else).
I think a different component (Pivot Table) is a more suitable solution here.
For instance, DevExpress PivotGridControl supports in-place editors such as Progress Bar (see the following example).
In addition, you can hide cells with zero values by handling the CustomCellDisplayText event and setting the e.DisplayText property to an empty string.
The simple answer is YES, it is possible

Categories

Resources