Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
web:chart [2019/01/09 13:52]
agcyphers [Properties]
web:chart [2019/10/17 12:30]
agcyphers [Examples]
Line 89: Line 89:
 | Labels() | [[http://​developer.xojo.com/​string|String]] | Nil | The array of dataset labels to use in the chart. | | Labels() | [[http://​developer.xojo.com/​string|String]] | Nil | The array of dataset labels to use in the chart. |
 | LabelsVisible | [[http://​developer.xojo.com/​boolean|Boolean]] | True | Determines whether axis labels are displayed. | | LabelsVisible | [[http://​developer.xojo.com/​boolean|Boolean]] | True | Determines whether axis labels are displayed. |
 +| MultiTooltipTemplate | String | ""​ | Template to use for displaying tooltips for multiple overlapping datapoints. |
 | PointDotRadius | [[http://​developer.xojo.com/​integer|Integer]] | 4 | The size of the circle for each data point in applicable charts. | | PointDotRadius | [[http://​developer.xojo.com/​integer|Integer]] | 4 | The size of the circle for each data point in applicable charts. |
 | PointDotStrokeWidth | [[http://​developer.xojo.com/​integer|Integer]] | 1 | The width of the Point Dot's Stroke. | | PointDotStrokeWidth | [[http://​developer.xojo.com/​integer|Integer]] | 1 | The width of the Point Dot's Stroke. |
Line 101: Line 102:
 | TooltipFillColor | [[http://​developer.xojo.com/​color|Color]] | &​c000000 | The background color for the displayed tooltips. | | TooltipFillColor | [[http://​developer.xojo.com/​color|Color]] | &​c000000 | The background color for the displayed tooltips. |
 | TooltipFontColor | [[http://​developer.xojo.com/​color|Color]] | &​cFFFFFF | The text color for the displayed tooltips. | | TooltipFontColor | [[http://​developer.xojo.com/​color|Color]] | &​cFFFFFF | The text color for the displayed tooltips. |
 +| TooltipTemple | String | ""​ | Template to be used for displaying datapoint tooltips. |
 | TooltipTitleFontColor | [[http://​developer.xojo.com/​color|Color]] | &​cFFFFFF | The text color used in displaying titles on the tooltips. | | TooltipTitleFontColor | [[http://​developer.xojo.com/​color|Color]] | &​cFFFFFF | The text color used in displaying titles on the tooltips. |
- 
 ==== Examples ==== ==== Examples ====
 === Random Bar Chart === === Random Bar Chart ===
Line 152: Line 153:
 chartInstance.ScaleWidth = 10 '// Add an axis point every 10 values between 0 and 100 (0..10..20..30)</​code>​ chartInstance.ScaleWidth = 10 '// Add an axis point every 10 values between 0 and 100 (0..10..20..30)</​code>​
  
 +=== Tooltip Templates ===
 +Anything in between <% and %> will be executed as JavaScript. For example: ''<​% if (label) { %> and later <% } %>''​. Using ''<​%= expr %>''​ will print the value of the variable named by ''​expr''​ into the tooltip.
 +
 +The available variables to print into the tooltip depends on the chart type. In general, the following variables are available:
 +
 +^ Variable ​     ^ Description ​      ^
 +| value | value of the data point |
 +| label | label for the position the data point is at |
 +| datasetLabel | label for the dataset the point is from |
 +| strokeColor | stroke color for the dataset |
 +| fillColor | fill color for the dataset |
 +| highlightFill | highlight fill color for the dataset |
 +| highlightStroke | highlight stroke color for the dataset |