cfchartseries markerstyle won't change from diamond

Description

cfchartseries markerStyle is defaulting to diamonds and won't change to circle, nor rectangle, triangle, etc.

Here is my code which is working perfectly except for the markerStyle:

<cfchart xAxisTitle="Day" yAxisTitle="Sales Per Day" labelformat="currency" chartwidth="680" chartheight="400" font="Courier" fontsize="12" gridlines=6 showXGridlines="yes" showYGridlines="no" showborder="yes" show3d="no"> <cfchartseries type="line" query="qrySales" valueColumn="total" itemColumn="date" seriesColor="darkgreen" paintStyle="plain" markerStyle="circle" /> </cfchart>

Lucee docs for cfchartseries is sparse compared to Adobe's and cfdocs.org's, but it does at least include markerStyle as an attribute of cfchartseries, so what is the point of that if diamond is the only one supported? Is this a bug or is it an unimplemented feature with lack of documentation?

Environment

in both Ubuntu and CloudLinux

Activity

Pothys - MitrahSoft 
4 July 2023 at 07:57

I've checked this ticket with chart extension version 1.0.19.25. Now cfchartseries markerStyle attribute was change from diamond shape to circle, rectangle and triangle. the issue was solved.

Pothys - MitrahSoft 
23 April 2021 at 14:43

I've checked this ticket and confirmed the issue happened on lucee latest version 5.3.8.170 and the chart extension version 1.0.19.24 also. Lucee ignores the markerStyle attribute in cfchartseries tag and takes diamond as a chart marker. Seems ACF works fine.
https://github.com/lucee/extension-chart/blob/master/source/java/src/org/lucee/extension/chart/tag/Chart.java#L1022

I added a fix for this ticket.
Pull Request: https://github.com/lucee/extension-chart/pull/2

Kenric Ashe 
22 April 2021 at 23:35

I just realized I don’t know for a fact that it’s supported by ColdFusion either. Ha! Could be it’s ignored by ChartSeriesBean() in Java and defaults to diamond?

Kenric Ashe 
22 April 2021 at 23:16
(edited)

, I see nothing in the source explaining why the markerStyle attribute in Lucee is ignored:

public void setMarkerstyle(String strMarkerStyle) throws PageException { strMarkerStyle=strMarkerStyle.trim().toLowerCase(); if("circle".equals(strMarkerStyle)) series.setMarkerStyle(ChartSeriesBean.MARKER_STYLE_CIRCLE); else if("diamond".equals(strMarkerStyle)) series.setMarkerStyle(ChartSeriesBean.MARKER_STYLE_DIAMOND); else if("letter".equals(strMarkerStyle)) series.setMarkerStyle(ChartSeriesBean.MARKER_STYLE_LETTER); else if("mcross".equals(strMarkerStyle)) series.setMarkerStyle(ChartSeriesBean.MARKER_STYLE_MCROSS); else if("rcross".equals(strMarkerStyle)) series.setMarkerStyle(ChartSeriesBean.MARKER_STYLE_RCROSS); else if("rectangle".equals(strMarkerStyle)) series.setMarkerStyle(ChartSeriesBean.MARKER_STYLE_RECTANGLE); else if("snow".equals(strMarkerStyle)) series.setMarkerStyle(ChartSeriesBean.MARKER_STYLE_SNOW); else if("triangle".equals(strMarkerStyle)) series.setMarkerStyle(ChartSeriesBean.MARKER_STYLE_TRIANGLE); else throw CFMLEngineFactory.getInstance().getExceptionUtil().createApplicationException("invalid value ["+strMarkerStyle+"] for attribute markerStyle, for this attribute only the following values are supported " + "[circle, diamond, letter, mcross, rcross, rectangle, snow, triangle]"); }

Other attributes work so why not that one?

I am well aware that there are a multitude of fancier and responsive JavaScript/CSS chart/graph solutions available, most notably Chart.js, but cfchart has two advantages which deserve more respect: 1) The coding for it is super quick and easy which is perfect for prototypes and 2) it dynamically generates an image which can easily be copy/pasted into an email or whatever (as opposed to the extra steps of taking a screenshot).

Furthermore, if the only purpose of cfchart is backwards compatibility, then Lucee has not even accomplished that, as markerStyle is supported by ColdFusion but apparently not by Lucee!

So I’ll ask again, is this a bug or is it a purposely unimplemented feature with lack of documentation? Since the method for the attribute exists in the Java source with all the values advertised by Adobe, it seems like a bug.

My Java runtime version by the way is 11.0.6+10.

Fixed

Details

Assignee

Reporter

Priority

Labels

Fix versions

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Affects versions

Created 22 April 2021 at 17:02
Updated 4 July 2023 at 07:58
Resolved 4 July 2023 at 07:58