Skip to content

Is it possible to have multiple markers per candle in the candlestick chart. #9833

@azpublic

Description

@azpublic

General Questions

Issue Type

  • [x ] I have a question to ask about how to use ECharts to ...;我想提问如何使用 ECharts 实现某功能
  • I have a bug to report;我想要报 bug
  • I have a feature to request, e.g.: I'd like a new feature that ...;我需要一个新功能
  • I have a feature to enhance, e.g.: The current feature should be improved in the way that ...;我希望改进某个功能
  • There's something wrong with the documents;文档有些问题
  • Others, or I'm not sure which issue types to choose here;其他,或我不知道应该选什么类型

Issue Details

Is it possible to have multiple markers per candle in the candlestick chart. I have tried and if I have more than one marker for the same date , only one marker will be displayed.
How can I have more than one ? Can you suggest any workaround such as overlaying arbitrary points on top of the candelstick chart with another series type?

Thank you.

Expected Behavior

have multiple markers for the same candle

Current Behavior

Only one marker per candle is allowed.

Online Example

var options = {

		animation: false,
		color: colorList,
		title: {
			left: 'center',
			text: 'candlestick chart'
		},
		tooltip: {
			trigger: 'axis',
			axisPointer: {
				type: 'cross'
			}
		},

		dataZoom: [
			{
				type: 'inside',
				start: 0,
				end: 100
			},
			{
				show: true,
				type: 'slider',
				y: '90%',
				start: 0,
				end: 100
			}
		],


		xAxis: {
			data: dates,
			min: 'dataMin',
			max: 'dataMax',
			axisLabel: {
				formatter: function (value) {
					let d = new Date(parseInt(value));
					return (d.getUTCHours()+1)+"-"+d.getMinutes();
				}
			},

		},

		yAxis: {
			scale: true,
		},


		series: [

			{
				type: 'candlestick',
				name: 'candles',
				data: cndls,
				itemStyle: {
					normal: {
						color: '#58b1b0', 
						color0: '#ef232a',
						borderColor: '#133bb1',
						borderColor0: '#ef232a',
					},
					emphasis: {
						color: 'black',
						color0: '#444',
						borderColor: 'black',
						borderColor0: '#444'
					}
				},

				markPoint: {
					data : trades,
				}
			},

			{
				type: 'line',
				name: 'ema',
				data: emaPoints,
			},



		] //series
	};

Topics

Anything Else We Need to Know

N/A

Environment

  • ECharts version;ECharts 版本: latest

  • It happens only on certain browsers or operating systems. 对于特定浏览器或操作系统才会出现的问题,请提供相应环境信息:{BROWSER_VERSION_OR_OS_INFORMATION_HERE}

Metadata

Metadata

Assignees

No one assigned

    Labels

    inactiveNot active for some time or no response from the author. Will be closed soon.missing-demoThe author should provide a demo.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions