Marker

A marker element of chart
Class: Chart.Marker()


Code using Axis Class
                                    var chart = new Cosfire.Chart("chart-div",{width:700,
                                           height:250});

 axesX: [{title: 'Favorite Colour'}];
 axesY: [{title: 'No of People'}];
 /* Create instance of Marker */
 data: [{ 
         plotAs: 'spline',
         color: 'black',
         points: [
                 {xLabel: "Red", y: 1005},
                 {xLabel: "Yellow", y: 403},
                 {xLabel: "Blue", y: 161},
                 {xLabel: "Green", y: 650},
                 {xLabel: "Pink", y: 251},
                 {xLabel: "Black", y: 190},
                 {xLabel: "White", y: 250},
                 {xLabel: "Purple", y: 60}
                 ]
        }
 ];

 /* Add the marker to dataSeries and dataPoint */
chart.setData(data);    
chart.render();
                                
Using JSON Approach
                                     var chartJSON = { 
     width: 700,
     height: 250,
     axesX: [{ title: 'Favorite Colour' }],
     axesY: [{ title: 'No of People' }],
     data: [{ plotAs: 'spline',
              color: 'black',
              points: [{ xLabel: "Red", y: 1005 },
                       { xLabel: "Yellow", y: 403 },
                       { xLabel: "Blue", y: 161 },
                       { xLabel: "Green", y: 650 },
                       { xLabel: "Pink", y: 251 },
                       { xLabel: "Black", y: 190 },
                       { xLabel: "White", y: 250 },
                       { xLabel: "Purple", y: 60 }]
           }]
  };

 chart = new Cosfire.Chart("chart-div", chartJSON);
 chart.render();

                                   
                                
                                 
                                  
                                

List of Properties Supported in Marker.


Properties Supported By A Marker Object
Property Type Default Possible Values Description
enable Boolean true • true • false Marker shape type.
type String "circle" • circle • square • cross • triangle • null Marker shape type.
size Number Number>0 --- Uniform Size of the marker.
color String --- Colors are specified using predefined color names, or RGB, HEX, HSL, RGBA, HSLA values. Color of the marker.
borderColor String value is auto calculated for best look and feel. Colors are specified using predefined color names, or RGB, HEX, HSL, RGBA, HSLA values. Border color of the marker.
borderWidth Number Value is auto calculated for best look and feel. --- Border thickness or width of the marker border line.
borderStyle String "solid" • solid • dotted • dashed Style of the border.
shadow Boolean false • true • false Marker shadow.