Hello.
I'm trying to create a cartesian chart that displays both an AreaSeries and a LineSeries. I have explicitly set the marker visibility to false just in case, even though this is the default setting.
If I give the LineSeries an opaque color, like this:
It is rendered as expected, both zoomed in and zoomed out:
However, if I give the LineSeries a semi-transparent color (20% opacity), like this:
I get some kind of visible "circle" for every single datapoint, which completely changes the effective color of the line when zoomed out:
Can you please look into this? Not sure if it's a bug or I'm missing something.
Thanks!
Hi Víctor,
We are validating your query at our end and we will update further status in one business day (26 Oct 2022). We appreciate your patience until then.
Regards,
Sriram Kiran
Hi Víctor,
Greetings from Syncfusion. We have validated your query at our end, and we would like to let you know that the rendering behaviour of line series is that two consecutive points as considered as a segment and drawn as individual paths one by one to render as the line series and so due to this, the segment points connection are getting overlapped and shows as a circle when the opacity is provided for the series. This is the default rendering behaviour of line series.
However, we can achieve your requirement with the help of fast line series which renders the whole series as a single path when the dash array is set for the series. So, in your case, you can set the dash array values to a minimum value (say 0.01) to avoid gaps in-between. We have also created a simple sample in which we have achieved the same and attached it below for reference.
Please check with the sample and revert us if you have further concerns.
Regards,
Sriram Kiran
Hi and thanks for your support!
I wasn't aware about the FastLineSeries, I just tried your suggestion. Unfortunately it has a few issues.
First of all, using a dash array means the legend incorrectly displays a dashed pattern as well, which doesn't match what's visible on the actual chart:
This would probably force me to create a custom legend, which isn't ideal.
Second, if I set the dash array to [0.01, 0.01] as suggested, the iOS simulator is crashing altogether when I choose the "1m" zoom level in my chart (1 month worth of data, which means 30 datapoints). Not sure if there's some sort of memory leak or similar, but it seems I can avoid it by choosing more conservative values, such as [1, 1].
However, there's a bigger issue that's always present with the FastLienSeries (whether I use a dash array or not):
I have the "trackballBehavior" set up this way:
With the regular LineSeries, it works as expected. I can drag my finger across the chart and the tooltip will follow me showing the relevant data for each point.
However, after switching to the FastLineSeries, this feature seems to be broken. Now, when tapping and dragging my finger through the chart, it will work for some points but will eventually throw this exception when I reach certain parts of the chart:
It will then continue throwing exceptions for as long as I keep dragging my finger:
etc. etc.
Any idea of why this may be happening?
It doesn't seem like I can use the FastLineSeries as is.
Hi Víctor,
We have checked your query and we tried to replicate the reported issue regarding exception throwing when dragging along the fast line series by creating a simple sample similar to the provided screenshot. Unfortunately, the reported exception didn’t reproduce at our end. As we are not exactly sure on what scenario the issue is replicating, we kindly request you to try to replicate the reported issue in the below-attached test sample with your chart data source and revert us with it so that it will be helpful in further analysis to assist you in a better way.
Regards,
Sriram Kiran