I’ve been using this, and it’s awesome! However, I wanted to include the values on the bar charts as seen on page 3 of this post, but the links to DropBox seem to have been disabled. Has anyone used these charts and made your own updates to it?
Thanks Norman. I have been going by his v1.3.1, but I see that others have added to the project to include the values on the bar graphs. Do you know how to do this? The DropBox files from languer for v1.3.1b are not valid anymore
[quote=45395:@Ryan Hartz]Thanks Norman. I have been going by his v1.3.1, but I see that others have added to the project to include the values on the bar graphs. Do you know how to do this? The DropBox files from languer for v1.3.1b are not valid anymore
[/quote]
I’ll see what I can do to get the dropbox link working, but more importantly I’ll try to get it into github. I may need some help though.
I attempted making a dataItemstr() as string and barCountstr as string, but am getting an error that this is expecting Int32 and not string. Any ideas? Here’s what I tried
If labelPosition > 0 Then
// x-position, compensate for label width
labelX = bar.X
labelX = labelX - ( Str(dataItem(barCount)).Len / 0.5 )
// y-position
If labelPosition > 1 Then
labelY = bar.Y + (barHeight / 2)
pic.Graphics.ForeColor = &c000000
pic.Graphics.Bold = True
barCountstr = Format(barCount, "\\$###,###,##0.00")
Else
labelY = bar.Y
labelY = labelY + 6 // compensate for label height
pic.Graphics.ForeColor = &cFFFFFF
End If
pic.Graphics.DrawString(str(dataItemstr(barCountstr)),labelX, labelY,0,True)
End If
This is very impressive chart class. But I’m novice to Xojo stuff.
I’m able to change label color, dynamically change scale of the chart , but I have problem with background. I would love to change white to different color
Does anyone know how to change background colour of the chart/canvas I can’t figure it out by myself ?
[quote=83431:@piotr dabrowski]This is very impressive chart class. But I’m novice to Xojo stuff.
I’m able to change label color, dynamically change scale of the chart , but I have problem with background. I would love to change white to different color
Does anyone know how to change background colour of the chart/canvas I can’t figure it out by myself ?[/quote]
Hi Piotr,
I am happy to hear that you find the charting class helpful
Initially when I created it, I did not have background color in mind… but I do now I just updated the github version to 1.3.2 to accommodate your request rhCharts .
you would add background color like line column chart 2 example:
[code] ’ Chart Width, Chart Height, Chart Title, Minimum Scale, Maximium Scale, Number Of Gridlines, Label Spacing, Data Item Array, Data Label Array, Data Color Array, Text Orientation, GridStyle, Background Color
I have used “pic.Transparent=1” in chartColumn" event but it is not that I wanted.
I find this project/class very useful as tutorial too. One can learn a lot from it.
I must say that I admire people like you to contribute to Xojo in this way.
Once more thank you for your time and effort. I hope some day I would be able to contribute with such project/class too.
[quote=83559:@piotr dabrowski]Thanks Rich - ‘You Are The Man’
I have used “pic.Transparent=1” in chartColumn" event but it is not that I wanted.
I find this project/class very useful as tutorial too. One can learn a lot from it.
I must say that I admire people like you to contribute to Xojo in this way.
Once more thank you for your time and effort. I hope some day I would be able to contribute with such project/class too.[/quote]
Thank you for your kind words
The Xojo community is a fantastic one and I too found I learned best by looking at example projects and reading the forums. My charting class started out as a proof of concept of how I could work with drawing graphics to a canvas which translated into me wanting to share it with the community as a thank you to all the help I received along the way.
My goal in the future is to add more charts to the class; however, I have found that two small children have there way of planning my day
Hello everybody, I’m trying the version 1.3.2 and works awesome, thank you very much Rich for share it, I prefer the bars without border line, that’s no problem, but I would like change a few things too, like to show the value of each bar like Ryan say above but I can’t find where to do that, one different color for each column (b.e. like when you show a poll result, different results for the same question) and finally to make the bars a little bit slim and more separated from each other, I hope some one could help me with this, have a nice day, thank you…