A table consists of 4 fields:
X: time values in ascending order
Y: numeric value - double
A: numeric value - int
B: numeric value - int
I need to create a line chart using the X,Y values. And at each of the x,y points also show a pie/circle representing the A,B values as follows:
The centre of the pie is the x,y point. The diameter of the pie is calculated from the values A and B. The pie will have 2 different coloured slices, the size of each slice is proportion to the value of A and B.
After searching the documentations of lcjs, can this be done using Lightning Charts JS? if not, how about lc.NET?
Any hints is much appriciated. Thank you
X: time values in ascending order
Moderator: Queue Moderators
-
- Posts: 557
- Joined: Mon Mar 14, 2016 9:22 am
Re: X: time values in ascending order
A picture is worth a thousand words. It would be helpful if you included picture with such question.
If you want to ask LightningChart JS related question you should check this topic.
As for LightningChart .NET you may try searching our Demo (Interactive Examples App) with keyword 'pie' or similar. For example, that is maybe the result If you see suitable example, then you can extract it as standalone project and investigate its code.
All the best.
If you want to ask LightningChart JS related question you should check this topic.
As for LightningChart .NET you may try searching our Demo (Interactive Examples App) with keyword 'pie' or similar. For example, that is maybe the result If you see suitable example, then you can extract it as standalone project and investigate its code.
All the best.
Re: X: time values in ascending order
Please see the attached image. When it is zoomed out, there could me few thousands of these pies on the screen.
- Attachments
-
- chart customization.png (195.31 KiB) Viewed 18046 times
Re: X: time values in ascending order
Here is another partial screenshot
- Attachments
-
- pieSlices.png (159.25 KiB) Viewed 18046 times
-
- Posts: 557
- Joined: Mon Mar 14, 2016 9:22 am
Re: X: time values in ascending order
You could build such Pies with PolygonSeries.
In my screenshot of .NET Demo that was last example in the table, ExampleZoomable2DPie. Each pie will be combination of two PolygonSeries and then you multiple by number of pies.
I worry a little bit that thousands of PolygonSeries may have some performance issue. The lighter version would be to convert individual Pie to bitmap image and use this image as SeriesEventMarker.Symbol.Shape = SeriesMarkerPointShape.Bitmap.
How to do custom drawing (with GDI rendering) is show in ExampleCustomRendering.
In my screenshot of .NET Demo that was last example in the table, ExampleZoomable2DPie. Each pie will be combination of two PolygonSeries and then you multiple by number of pies.
I worry a little bit that thousands of PolygonSeries may have some performance issue. The lighter version would be to convert individual Pie to bitmap image and use this image as SeriesEventMarker.Symbol.Shape = SeriesMarkerPointShape.Bitmap.
How to do custom drawing (with GDI rendering) is show in ExampleCustomRendering.
Re: X: time values in ascending order
What about the multicolor histogram?
Could you please point to which methods of the LC .Net that would work?
The histogram may need to be vertical as originally posted or horisontal as shown in the attached image.
Also, does LC.net support adding markers text as shown in the horizontal histogram image?
Thanks
Could you please point to which methods of the LC .Net that would work?
The histogram may need to be vertical as originally posted or horisontal as shown in the attached image.
Also, does LC.net support adding markers text as shown in the horizontal histogram image?
Thanks
- Attachments
-
- histogram_multiColor.png (60.06 KiB) Viewed 18028 times
-
- histogram_horizontal.png (48.58 KiB) Viewed 18028 times
-
- Posts: 557
- Joined: Mon Mar 14, 2016 9:22 am
Re: X: time values in ascending order
If number of bars relative small, you can use BarSeries stacking feature/property. That is, set
The example of such usage could be found in our Demo: ExampleStackedBars or ExampleBarsNegativeValues.
Alternative, especially if number of bars is expected to be thousands, is LineCollection approach. You can find description of this Series in User Manual as well as demonstration in Demo.
Code: Select all
_chart.ViewXY.BarViewOptions.Stacking = BarsStacking.Stack;
Alternative, especially if number of bars is expected to be thousands, is LineCollection approach. You can find description of this Series in User Manual as well as demonstration in Demo.