Points between major ticks on Chart

Stimulsoft Reports.NET discussion
ilkuzn
Posts: 6
Joined: Thu May 07, 2020 9:11 am

Points between major ticks on Chart

Post by ilkuzn »

Hi!
Could you please help with an algorithm how to put set of data on chart in the following way:

1. Show vertical grid lines for some specific dates (for example every 1 hour) starting from Start to End date.
2. Show points on Chart for values with any date between Start and End date. Data comes to the report from dataset as datasource. Format and structure of incoming set of data we can change, so I'd like to see some common solution or direction how to organize data to be able to draw such chart.

I add an attachment, the pink points I'm able to draw, but how to add points in black?

Thanks in advance!
Attachments
Chart_question.jpg
Chart_question.jpg (58.32 KiB) Viewed 2907 times
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Points between major ticks on Chart

Post by HighAley »

Hello.

You could try the Scatter chart and set the DateTime Step property of the X axis to 1 hour.

Thank you.
ilkuzn
Posts: 6
Joined: Thu May 07, 2020 9:11 am

Re: Points between major ticks on Chart

Post by ilkuzn »

Hello again!

One more question:
How can I control the amount of vertical grid lines on Scatter graph? or on any other graphs?
Is there any possibility to get graph paper on graph background? (vertical and horisontal grid lines with 1mm between them)
Lech Kulikowski
Posts: 6245
Joined: Tue Mar 20, 2018 5:34 am

Re: Points between major ticks on Chart

Post by Lech Kulikowski »

Hello,

You can use the MinorCount property for the GridLines.

Thank you.
ilkuzn
Posts: 6
Joined: Thu May 07, 2020 9:11 am

Re: Points between major ticks on Chart

Post by ilkuzn »

Hi!
Thank you for your answers.
Could you please show which parameters allow to control amount of labels (and I guess amount of major vertical grid lines) on X-axis?

In attachment there are 2 files - template and test data file.

Thanks in advace!
Attachments
TrendGraphTemplate.mrt
(20.93 KiB) Downloaded 124 times
testData.xml
(60.59 KiB) Downloaded 118 times
Lech Kulikowski
Posts: 6245
Joined: Tue Mar 20, 2018 5:34 am

Re: Points between major ticks on Chart

Post by Lech Kulikowski »

Hello,

Could you clarify which result do you need?

Thank you.
ilkuzn
Posts: 6
Joined: Thu May 07, 2020 9:11 am

Re: Points between major ticks on Chart

Post by ilkuzn »

Hello,

I'd like to have ability to control labels and gridlines on X-axis dynamically and independently from Argument values.
For example I have 28 values in my data with timestamps from 01-01-2020 12:33 to 01-01-2020 17:13 (10 minutes interval). The goal is to have X-axis starting from 01-01-2020 12:00 with 1h(or 40 minutes or any number of minutes) interval between major ticks and ends at 01-01-2020 18:00 ( or bit sooner or later depending on ticks interval).
If I have 100 values in my data the X-axis might have 10 major ticks with 100 minutes between them or 12 with 85 minutes and so on...
Ideally labels for major ticks might be configurable, i.e. output values for labeling comes from some other data structure.

Thanks in advance!
Lech Kulikowski
Posts: 6245
Joined: Tue Mar 20, 2018 5:34 am

Re: Points between major ticks on Chart

Post by Lech Kulikowski »

Hello,

You can try to set the neccesary value in the BeforePrint events depends on count data.

Thank you.
erobso
Posts: 8
Joined: Fri Feb 21, 2020 10:07 am

Re: Points between major ticks on Chart

Post by erobso »

Apologies for resurrecting a dead thread, but would you be able to share how exactly to set the ticks via BeforePrint/code? Which property should I be looking to set on the chart, and with what kind of data?

For reference, I have three series using DateTimes for their arguments on a Scatter Line chart, and I am struggling to get the x-axis to display the number of ticks I want - neither the Step or DateTimeStep seems to do anything helpful about this, so I'm hoping to just set the tick values myself.
Lech Kulikowski
Posts: 6245
Joined: Tue Mar 20, 2018 5:34 am

Re: Points between major ticks on Chart

Post by Lech Kulikowski »

Hello,

You can set the necessary option in the Chart Editor, then open the Code tab and check the option in the code.

Thank you.
Post Reply