Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Questions (Windows Mobile)
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Questions (Windows Mobile) Post any question regarding Basic4ppc.

ChartsDevice.dll thick line at bottom of chart

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-27-2008, 11:11 AM
Basic4ppc Veteran
 
Join Date: Dec 2008
Posts: 203
Awards Showcase
Beta Tester 
Total Awards: 1
Default ChartsDevice.dll thick line at bottom of chart

For some reason when I use the ChartsDevice dll (and same on the desktop)
I get a thick line just above the x-axis going from position 0 to about 9 tenth
of the x-axis. I noticed the provided example (the line chart) does the same and I have no idea how to get rid of it.
Any ideas?

RBS
Reply With Quote
  #2 (permalink)  
Old 12-27-2008, 12:21 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Assuming that you mean the line at y = 0 it is there by design to show the y axis origin.
Reply With Quote
  #3 (permalink)  
Old 12-27-2008, 02:13 PM
Basic4ppc Veteran
 
Join Date: Dec 2008
Posts: 203
Awards Showcase
Beta Tester 
Total Awards: 1
Default

I attached a .gif file that shows what I am talking about.
The line in this image runs till the 9 in the second date.

RBS
Attached Images
File Type: jpg LineDemo.jpg (15.1 KB, 18 views)
Reply With Quote
  #4 (permalink)  
Old 12-27-2008, 02:17 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

I don't see anything like that in the line chart example, Can you post the code that created the chart so I can try it on my system.
Reply With Quote
  #5 (permalink)  
Old 12-27-2008, 02:32 PM
Basic4ppc Veteran
 
Join Date: Dec 2008
Posts: 203
Awards Showcase
Beta Tester 
Total Awards: 1
Default

This code shows it with me:

Sub DrawLineChart

LineChart.New1(Image1.Width, Image1.Height)
LineChart.Text = "BP values"
LineChart.Color = Rgb(255,255,230)
LineChart.ColorGradient = cBlue
LineChart.GridSpacingValue = 20
LineChart.MaxScaleValue = 180
LineChart.MinScaleValue = 80
LineChart.ShowGrid = False
LineChart.BorderSize = 10
LineChart.MarginForTextOnAxis = 10

LineChart.XAxisIntervalValue = 1
LineChart.AddXAxisText(240,240, "")

LineChart.NewLine(cRed)
LineChart.AddPoint(0, 160)
LineChart.AddPoint(1, 150)
LineChart.AddPoint(2, 155)
LineChart.AddPoint(3, 170)
LineChart.AddPoint(4, 180)
LineChart.AddPoint(5, 150)
LineChart.AddPoint(6, 140)
linechart.ShowGrid = True
LineChart.AddLine

LineChart.NewLine(cBlue)
LineChart.AddPoint(0, 90)
LineChart.AddPoint(1, 85)
LineChart.AddPoint(2, 90)
LineChart.AddPoint(3, 100)
LineChart.AddPoint(4, 110)
LineChart.AddPoint(5, 80)
LineChart.AddPoint(6, 140)
LineChart.AddLine

LineChart.NewLine(cGreen)
LineChart.LineWidth = 1
LineChart.AddPoint(0, 85)
LineChart.AddPoint(5, 25)
LineChart.AddPoint(10, 65)
LineChart.AddPoint(15, 75)
LineChart.AddPoint(20, 10)
LineChart.AddTrendLine

Image1.Image =LineChart.Draw

End Sub


RBS
Reply With Quote
  #6 (permalink)  
Old 12-27-2008, 03:39 PM
klaus's Avatar
Basic4ppc Expert
 
Join Date: Oct 2007
Location: Fully, Switzerland
Posts: 4,463
Awards Showcase
Forum Contributer Beta Tester Competition Winner 
Total Awards: 3
Default

I have looked at your code.
The code you posted doesn't match your image, why didn't you post the right code?

The problem lies in the line
Code:
<font face="Courier New"><font size="2"><font face="Courier New"><font size="2">LineChart.AddXAxisText(</font></font></font></font><font face="Courier New"><font size="2"><font color="#800080"><font face="Courier New"><font size="2"><font color="#800080"><font face="Courier New"><font size="2"><font color="#800080">240</font></font></font></font></font></font></font></font></font><font face="Courier New"><font size="2"><font face="Courier New"><font size="2">,</font></font></font></font><font face="Courier New"><font size="2"><font color="#800080"><font face="Courier New"><font size="2"><font color="#800080"><font face="Courier New"><font size="2"><font color="#800080">240</font></font></font></font></font></font></font></font></font><font face="Courier New"><font size="2"><font face="Courier New"><font size="2">, </font></font></font></font><font face="Courier New"><font size="2"><font color="#800000"><font face="Courier New"><font size="2"><font color="#800000"><font face="Courier New"><font size="2"><font color="#800000">""</font></font></font></font></font></font></font></font></font><font face="Courier New"><font size="2"><font face="Courier New"><font size="2">)</font></font></font></font>
if you replae it by
Code:
<font face="Courier New"><font size="2"><font face="Courier New"><font size="2">LineChart.AddXAxisText(</font></font></font></font><font face="Courier New"><font size="2"><font color="#800080"><font face="Courier New"><font size="2"><font color="#800080"><font face="Courier New"><font size="2"><font color="#800080">0</font></font></font></font></font></font></font></font></font><font face="Courier New"><font size="2"><font face="Courier New"><font size="2">,</font></font></font></font><font face="Courier New"><font size="2"><font color="#800080"><font face="Courier New"><font size="2"><font color="#800080"><font face="Courier New"><font size="2"><font color="#800080">20</font></font></font></font></font></font></font></font></font><font face="Courier New"><font size="2"><font face="Courier New"><font size="2">, </font></font></font></font><font face="Courier New"><font size="2"><font color="#800000"><font face="Courier New"><font size="2"><font color="#800000"><font face="Courier New"><font size="2"><font color="#800000">""</font></font></font></font></font></font></font></font></font><font face="Courier New"><font size="2"><font face="Courier New"><font size="2">)</font></font></font></font>
you get a 'normal' X axis.

With you code the program tries to draw no text at position 240.

Attached 2 images.


@agraham
In trying this example I noticed that the parameter MinScaleValue with posutive values has no effect.

Code:
<font face="Courier New"><font size="2"><font face="Courier New"><font size="2">LineChart.MinScaleValue=</font></font></font></font><font face="Courier New"><font size="2"><font color="#800080"><font face="Courier New"><font size="2"><font color="#800080"><font face="Courier New"><font size="2"><font color="#800080">20</font></font></font></font></font></font></font></font></font>
Best regards.
Attached Images
File Type: jpg Chart_240_240..jpg (18.7 KB, 13 views)
File Type: jpg Chart_0_20.jpg (20.0 KB, 13 views)
__________________
Klaus
Switzerland

Beginner's Guide / User's Guide

Last edited by klaus : 12-27-2008 at 03:42 PM.
Reply With Quote
  #7 (permalink)  
Old 12-27-2008, 03:49 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

There are two problems here

First this statment "LineChart.XAxisIntervalValue = 1" puts the X-axis ticks too close together for a maximum scale value of 240 so they run into each other as a grey bar.

Second, why then does the grey bar not extend to the end? The answer is that there is a bug in drawing the ticks when the max value of the X axis (which is determined by the max value defined in the AddXAxisText statements) is greater than the number of display pixels along the the X-axis. If you need a larger value than this the solution is to scale the X values to be less than that number of pixels.

@Klaus
Quote:
In trying this example I noticed that the parameter MinScaleValue with posutive values has no effect.
That is correct. MinScaleValue is intended for extending the Y value range into negative values. If it is greater than 0 it has no effect.
Reply With Quote
  #8 (permalink)  
Old 12-27-2008, 04:03 PM
klaus's Avatar
Basic4ppc Expert
 
Join Date: Oct 2007
Location: Fully, Switzerland
Posts: 4,463
Awards Showcase
Forum Contributer Beta Tester Competition Winner 
Total Awards: 3
Default

In my mind I would have expected, that if I had a chart with values between 80 and 100 and setting the MinScaleValue to 80 and MaxScaleValue to 100, getting a diagram with a streched Y scale from 80 to 100.

Unfortunately this seems not beeing the case.

Best regards.
__________________
Klaus
Switzerland

Beginner's Guide / User's Guide
Reply With Quote
  #9 (permalink)  
Old 12-27-2008, 04:27 PM
Basic4ppc Veteran
 
Join Date: Dec 2008
Posts: 203
Awards Showcase
Beta Tester 
Total Awards: 1
Default

> The code you posted doesn't match your image, why didn't you post the right code?

The code that produced the image I posted is a lot more complex and I would have to simplify it a lot. The code I posted is simple and shows the problem.
Will look at Graham's post now.

RBS
Reply With Quote
  #10 (permalink)  
Old 12-27-2008, 04:32 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Bug fixed - http://www.basic4ppc.com/forum/addit...g-library.html
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
spacing x-axis dates with ChartsDevice.dll RB Smissaert Questions (Windows Mobile) 1 12-26-2008 03:21 PM
XYCalc -graphs an equation or editable table of figures in regular, bar or pie chart HarleyM Code Samples & Tips 2 11-24-2007 07:21 AM
Need to lose the bottom menu bar!!! cdeane Questions (Windows Mobile) 3 08-25-2007 04:46 PM
drawer with thick line hung Basic4ppc Wishlist 2 07-19-2007 01:38 PM
Bottom menu Zemog Questions (Windows Mobile) 6 06-26-2007 09:22 PM


All times are GMT. The time now is 08:01 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0