Chart
$("#blood_graph").ejChart(
{
palette: ["blue", "brown",],
primaryXAxis:
{
range: { min: fromDate, max: changeDate(toDate, 1), interval: interval, },
intervalType: intervaltype,
labelFormat: label,
valueType: 'datetime'
},
primaryYAxis:
{
labelFormat: '{value}',
range: {min:40,max:180,interval:20},
stripLine: [
{
text: 'BPDia',
visible: true,
start: _bloodPressureList.length > 0 ? _bloodPressureList[0].bpdiamin:0,
end: _bloodPressureList.length > 0 ? _bloodPressureList[0].bpdiamax:0,
color: '#00FF00',
borderWidth: 0,
opacity: 0.3,
borderColor: 'white',
zIndex: 'behind'
},
{
text: 'BPSys',
visible: true,
start: _bloodPressureList.length > 0 ? _bloodPressureList[0].bpsysmin:0,
end: _bloodPressureList.length > 0 ? _bloodPressureList[0].bpsysmax:0,
color: '#00FF00',
borderWidth: 0,
opacity: 0.3,
borderColor: 'white',
zIndex: 'behind'
},
]
},
commonSeriesOptions:
{
tooltip:
{
visible: true
}
},
series:
[
{
points: BPSysgraphDetails,
type: 'line',
enableAnimation: true,
marker:
{
shape: 'circle',
size:
{
height: 10, width: 10
},
visible: true
},
border: { width: 3 },
tooltip: { format: " Date : ej.format(#point.x#,d-MMM hh:mmtt) <br/> Sys : #point.y# " },
name: 'Systolic'
},
{
points: BPDiagraphDetails,
type: 'line',
enableAnimation: true,
marker:
{
shape: 'circle',
size:
{
height: 10, width: 10
},
visible: true
},
border: { width: 3 },
tooltip: { format: " Date : ej.format(#point.x#,d-MMM hh:mmtt) <br/> Dia : #point.y# " },
name: 'DiaSystolic'
},
],
canResize: true,
load: "loadTheme",
size: { height: "220" },
legend: { visible: false }
});
i have created a chart using this code.the chart is created.there are two different lines having the marker of different color.I want to label which color marker represent which field.Field name are Systolic and Dialsystolic.
for this i have tried the name field in series options but it is not working.
So please help me to find the solution for this.
|
JS:
<div id="Annotation1" style="color:blue;display: none; font-size:16px;">Systolic</div>
<div id="Annotation2" style="color:brown;display: none; font-size:16px;">DiaSystolic</div>
$("#blood_graph").ejChart({
//...
annotations: [
{ visible: true, content: "Annotation1", coordinateUnit: "points", x: new Date(2001, 01, 07), y: 65 },
{ visible: true, content: "Annotation2", coordinateUnit: "points", x: new Date(2009, 09, 07), y: 65 }],
legend: { visible: true }
});
|
- 3 Replies
- 2 Participants
-
SH Shalini
- Jan 11, 2018 04:22 AM UTC
- Jan 15, 2018 07:23 AM UTC