*** Edit ***
After a discussion, this is what will be implemented:
First draft is located here --> https://github.com/Stephanevg/PSHTML/blob/Feature_Charts/PSHTML/Classes/Public/Chart.ps1
Function must be located in Chart.ps1 and cannot be moved to a seperate file.
Hi, I would like to discuss here the naming convention used for the Chart cmdlets.
We would have several types of cmdlets:
- The ones that generate the DataSet(s)
- Creation of the Chart
General
When it comes to charts in PSHTML, I would suggest we prefix all the cmdlets with Chart:
EG:
New-PSHTMLChart(Creates an actual chart)
New-PSHTMLChartBarDataSetcreates aBar Chart dataset.
Like this, the user would see quickly, through intelisse, what is possible when it comes to charts.
DataSet
Currently, for complixity reasons, I have implemented a unique function per ChartType:
- New-PSHTMLChartBarDataSet
- New-PSHTMLChartPieDataSet
- New-PSHTMLChartLineDataSet
- New-PSHTMLChartDoughnutDataSet
According for which graph type the dataset will be used, properties and options will be different.
To implement this quickly enough, I have designed a function per type, which has the correct properties available.
I would like to discuss the naming convention of these charts:
For some reason, I think they would be better named, like this:
New-PSHTMLChartDataSet<Type>
EG:
New-PSHTMLChartDataSetBar
New-PSHTMLChartDataSetLine
New-PSHTMLChartDataSetPie
New-PSHTMLChartDataSetDoughnut
I would also like to discuss if it would make sense to add another function, that would create the right dataset. Something like this:
New-PSHTMLChartDataSet -Type Bar
The different type of dataset that would be created can be handled using ParameterSets.
I am just afraid that this might end up into a pretty complex function, which would end up to be difficult to test and maintain.
What would be the pros and cons from each way in your opinion?
Chart creation
Currently, the cmdlet that allows to creates a chart is 'logically' named: New-PSHTMLChart
It accepts a parameter -Type which accepts an Enum value of 'ChartType'. These contain all the current support charts (Pie,Line,Bar, Doughnut).
I don't think we need to change anything to this cmdlet, but I am open for discussions.
*** Edit ***
After a discussion, this is what will be implemented:
New-PSHTMLChartDataSetFirst draft is located here --> https://github.com/Stephanevg/PSHTML/blob/Feature_Charts/PSHTML/Classes/Public/Chart.ps1
Function must be located in Chart.ps1 and cannot be moved to a seperate file.
Hi, I would like to discuss here the naming convention used for the Chart cmdlets.
We would have several types of cmdlets:
General
When it comes to charts in PSHTML, I would suggest we prefix all the cmdlets with Chart:
EG:
New-PSHTMLChart(Creates an actual chart)New-PSHTMLChartBarDataSetcreates aBar Chart dataset.Like this, the user would see quickly, through intelisse, what is possible when it comes to charts.
DataSet
Currently, for complixity reasons, I have implemented a unique function per ChartType:
According for which graph type the dataset will be used, properties and options will be different.
To implement this quickly enough, I have designed a function per type, which has the correct properties available.
I would like to discuss the naming convention of these charts:
For some reason, I think they would be better named, like this:
New-PSHTMLChartDataSet<Type>EG:
New-PSHTMLChartDataSetBarNew-PSHTMLChartDataSetLineNew-PSHTMLChartDataSetPieNew-PSHTMLChartDataSetDoughnutI would also like to discuss if it would make sense to add another function, that would create the right dataset. Something like this:
New-PSHTMLChartDataSet -Type BarThe different type of dataset that would be created can be handled using ParameterSets.
I am just afraid that this might end up into a pretty complex function, which would end up to be difficult to test and maintain.
What would be the pros and cons from each way in your opinion?
Chart creation
Currently, the cmdlet that allows to creates a chart is 'logically' named:
New-PSHTMLChartIt accepts a parameter
-Typewhich accepts an Enum value of 'ChartType'. These contain all the current support charts (Pie,Line,Bar, Doughnut).I don't think we need to change anything to this cmdlet, but I am open for discussions.