Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [swtchart-dev] StepChart as a new Chart type

Hi Yash,

that's smart. Do it. Put the StepChart in the package "org.eclipse.swtchart.extensions.linecharts". Don't forget to add the header:

/*******************************************************************************
 * Copyright (c) 2020 SWTChart project.
 *
 * This program and the accompanying materials are made
 * available under the terms of the Eclipse Public License 2.0
 * which is available at https://www.eclipse.org/legal/epl-2.0/
 *
 * SPDX-License-Identifier: EPL-2.0
 *
 * Contributors:
 * Yash Bharatiya - initial API and implementation
 *******************************************************************************/


Best,
Philip

Am 19.03.20 um 11:57 schrieb Yash Bharatiya:
Hi,
I think that if a IStepSeriesSetting interface is added to extensions.stepchart bundle we will need some further additions like adding a 
IStepSeriesData and also creating a applyStepSeriesSettings in the BaseChart class like in the case of other charts.

Other option is to just drop the IStepSeriesSetting and make use of ILineSeriesSettings and enable steps when adding data series,
as shown in the attached file.

On Sun, 15 Mar 2020 at 11:43, Philip Wenig <philip.wenig@xxxxxxxxxxxxx> wrote:
If you create a StepChart which extends from LineChart (in a similar way as the ScatterChart), it could automatically modify the settings when adding the data. So the caller don't have to take care to set the flag "enableStep(true)". It will be set automatically when creating the series.


Best,
Philip

Am 15.03.20 um 07:10 schrieb Philip Wenig:
Alternatively,

you could play with the settings and create a demo part in:
org.eclipse.swtchart.extensions.examples

Using the setting series.enableStep(true) is the right choice.


Best,
Philip


Am 15.03.20 um 07:08 schrieb Philip Wenig:
Hi Yash,

it should work, if principally, extra values are added, when setting the series data.
Let me create a simple example the next week.


Best,
Philip

Am 15.03.20 um 07:06 schrieb Yash Bharatiya:
Hi,
When adding a new Chart type do we add a new Series like IStepSeries
or just add a new SeriesType like SeriesType.STEP in the SeriesType enum

e.g.-
ILineSeries lineSeries = (ILineSeries)chart.getSeriesSet().createSeries(SeriesType.STEP, "step series");
further we proceed as

if(type==SeriesType.STEP)
{
series=new LineSeries(chart,"Id");

series.enableStep(true);
}

_______________________________________________
swtchart-dev mailing list
swtchart-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/swtchart-dev

-- 
~~~~~~~~~~~~~~~~~~~~~~~~
OpenChrom - the open source alternative for chromatography / mass spectrometry
Dr. Philip Wenig » Founder » philip.wenig@xxxxxxxxxxxxx » http://www.openchrom.net
~~~~~~~~~~~~~~~~~~~~~~~~

_______________________________________________
swtchart-dev mailing list
swtchart-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/swtchart-dev

-- 
~~~~~~~~~~~~~~~~~~~~~~~~
OpenChrom - the open source alternative for chromatography / mass spectrometry
Dr. Philip Wenig » Founder » philip.wenig@xxxxxxxxxxxxx » http://www.openchrom.net
~~~~~~~~~~~~~~~~~~~~~~~~

_______________________________________________
swtchart-dev mailing list
swtchart-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/swtchart-dev

-- 
~~~~~~~~~~~~~~~~~~~~~~~~
OpenChrom - the open source alternative for chromatography / mass spectrometry
Dr. Philip Wenig » Founder » philip.wenig@xxxxxxxxxxxxx » http://www.openchrom.net
~~~~~~~~~~~~~~~~~~~~~~~~
_______________________________________________
swtchart-dev mailing list
swtchart-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/swtchart-dev

_______________________________________________
swtchart-dev mailing list
swtchart-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/swtchart-dev

-- 
~~~~~~~~~~~~~~~~~~~~~~~~
OpenChrom - the open source alternative for chromatography / mass spectrometry
Dr. Philip Wenig » Founder » philip.wenig@xxxxxxxxxxxxx » http://www.openchrom.net
~~~~~~~~~~~~~~~~~~~~~~~~

Back to the top