diff --git a/docs/graph2d/index.html b/docs/graph2d/index.html index cf3fdfb7..20b54195 100644 --- a/docs/graph2d/index.html +++ b/docs/graph2d/index.html @@ -546,15 +546,73 @@ function (value) { drawPoints - Boolean or Object + Boolean, Object or Function true - Toggle the drawing of the datapoints with the default settings. + Defines rendering options for the datapoints. + Three different types of objects can be assigned to this property. See Example 19 for an illustration.
+ 1. Boolean: When true is provided every datapoint will be drawn, false otherwise.
+
+drawPoints: true // or false
+            
+ + 2. Object (the 'rendering' options): If an object is provided it may contain following properties which all can be optional: onRender, classNamesize and/or style. For more information check the property's documentation.
+
+drawPoints: {
+  size: 3,
+  style: 'square'
+}
+            
+ + 3. Function: If a function is provided it will be used as a callback. The function may return values from listing 1 or 2.
+
+drawPoints: function(item, group, graph2d) {
+  ...
+}
+            
+ If a rendering property from the rendering option object is missing, the missing property will be fetched from the group's option. +
+ All of these three options can be defined within the drawPoints properties separately as well. + drawPoints.enabled Boolean true - Toggle the drawing of the datapoints. + Toggles the drawing of the datapoints. + + + drawPoints.onRender + function + none + Defines a render function for every datapoint. + If a group has no drawPoints.onRender callback, the graph2d drawPoints.onRender callback will be used. + If neither is defined, the datapoint will be rendered according to the group setting of drawPoints.enabled. + This callback must return true if the datapoint should be rendered, otherwise false. +
+drawPoints: {
+  enabled: true,
+  onRender: function(item, group, graph2d) {
+    // only renders items with labels
+    return item.label != null;
+  }
+}
+              
+ This callback may also return an object containing a size and style property, both are optional, e.g.: +
+onRender: function(item, group, graph2d) {
+  if (item.label == null) {
+    return false;
+  }
+
+  return {
+    style: 'circle',
+    size: 30
+  };
+}
+              
+ The properties className, style and size returned from the callback will be used for rendering the datapoint. + If a property is missing in the rendering option object, the missing property will be fetched from the group's option. + drawPoints.size