We would like to build a community for Small Basic programmers of any age who like to code. Everyone from total beginner to guru is welcome. Click here to register and share your programming journey!


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Chart Doesn't show true values
#1
In the chart function it does not show the true value. It will show a percentage and it graphs the true value, but will not show it. In the snippet if ran you will see what I mean.
Code:
Data["2000"]=1
Data["2001"]=2
Data["2002"]=3

Name=LDChart.AddChart(500,400)
LDChart.Legend(Name,1,"Legend_percent","True")
LDChart.Properties(Name,"Column",1)
LDChart.SetData(Name, Data)

It charts the data values 1,2,3 but will not show them. It does show the percentages up to 100%. Would it be possible in SetData to make values as a choice to show? Then it would show the value rather than a percentage?

JR
Reply
#2
Added Value and Legend_Value options to LDChart.Legend - Beta 1.2.29.17
[-] The following 1 user Likes litdev's post:
  • jrmrhrb00
Reply
#3
LitDev,

If I use column the values are horizontal.

Data["2000"]=1
Data["2001"]=2
Data["2002"]=3

Name=LDChart.AddChart(500,400)
LDChart.Legend(Name,1,"Value","True")
LDChart.Properties(Name,"Column",1)
LDChart.SetData(Name, Data)

This isn't bad, but would it be possible to have them verticle? Thanks,

JR
Reply
#4
Hi,

The issue comes when there are lots of columns or the values are long, for example:

Code:
For i = 1 To 20
  Data["Angle"+i]=Math.PI*i/20
EndFor

Name=LDChart.AddChart(500,400)
LDChart.Legend(Name,1,"Value","False")
LDChart.Properties(Name,"Column",1)
LDChart.SetData(Name, Data)
Reply
#5
LitDev,

Didn't think of that. What if you could check the width of the column sections with the width of the value and let it choose horizontal or vertical values? Just thinking!

JR
Reply
#6
Could do that but may be different for different columns, what should this do?

Code:
Data["2000"]=1.123456573253254
Data["2001"]=2
Data["2002"]=3

Name=LDChart.AddChart(500,400)
LDChart.Legend(Name,1,"Value","False")
LDChart.Properties(Name,"Column",1)
LDChart.SetData(Name, Data)

Maybe like this Beta 1.2.29.18
[-] The following 1 user Likes litdev's post:
  • jrmrhrb00
Reply
#7
LitDev,

That change got it. I ran it as column with normal width and it showed vertical values. Then I ran 1 value that was wider than the bar and it flipped to horizontal. Perfect! Many Thanks!

JR
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)